| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 143923 | 徐艺哲 | 统计硬币 | C++ | Compile Error | 0 MS | 0 KB | 648 | 2026-01-17 23:02:09 |
#include <iostream> using namespace std; int main(){ 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) RETURN 0; }
Main.cc: In function 'int main()': Main.cc:4:1: error: 'def' was not declared in this scope def count_combinations(T, test_cases): ^