Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
86949 张智博 统计硬币 Python3 Accepted 313 MS 3744 KB 241 2024-07-30 20:51:37

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)