| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 123551 | 王镜铭 | 过生日 | C++ | Compile Error | 0 MS | 0 KB | 306 | 2025-07-06 12:35:06 |
#include<bits/stdc++.h> using namespace std; int main() { int a, b = 0, c, d; cin >> a; cout << ""; for (int d = 1; d <= a; d++) { cin >> c >> d; for (x = d; x >= 0; x--) { c += 4; if (c % 100 == 0 && !c % 400 == 0) { c += 4; x++; } } cout<<c; } return 0; }
Main.cc: In function 'int main()':
Main.cc:9:8: error: 'x' was not declared in this scope
for (x = d; x >= 0; x--) {
^
Main.cc:4:9: warning: unused variable 'b' [-Wunused-variable]
int a, b = 0, c, d;
^
Main.cc:4:19: warning: unused variable 'd' [-Wunused-variable]
int a, b = 0, c, d;
^