| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 163564 | 李亭绪 | 统计硬币 | Python3 | Accepted | 155 MS | 3796 KB | 581 | 2026-10-26 09:15:34 |
def count_combinations(T, test_cases): results = [] for n, m in test_cases: count = 0 for one in range(0, n + 1): for two in range(0, (n - one) + 1): five = n - one - two if one + 2 * two + 5 * five == m: count += 1 results.append(count) return results T = int(input()) test_cases = [] for _ in range(T): n, m = map(int, input().split()) test_cases.append((n, m)) results = count_combinations(T, test_cases) for res in results: print(res)