Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
86249 朱正天 统计硬币 Python3 Accepted 154 MS 3788 KB 399 2024-07-23 20:23:37

Tests(1/1):


Code:

T = int(input()) tmp = [] res = [] for i in range(T): a = input().split() tmp.append(a) for i in tmp: count = 0 total = 0 count = int(i[0]) total = int(i[1]) p = 0 for a in range(count+1): for b in range(count+1-a): if a + b*2 + (count-a -b)*5 == total: p+=1 res.append(p) for i in res: print(i)