Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
74125 张智博 统计硬币 Python3 Accepted 326 MS 3748 KB 249 2024-05-22 21:54:30

Tests(1/1):


Code:

t = int(input()) for x in range(t): n,m = map(int,input().split()) cnt =0 for a in range(n+1): for b in range(n+1): c = n-a-b if a*1+b*2+c*5 == m: cnt += 1 print(cnt)