Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
86772 丁俊杰 统计硬币 Python3 Accepted 155 MS 3764 KB 323 2024-07-27 23:04:45

Tests(1/1):


Code:

t=int(input()) results=[] for x in range(t): n,m=map(int,input().split()) res=0 for i in range(n+1): #1yuan for j in range(n-i+1): #2yuan k=n-i-j #5yuan if i+2*j+5*k==m: res+=1 results.append(res) for result in results: print(result)