| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 122436 | 邹金行 | 15相同数的次数 | C++ | Compile Error | 0 MS | 0 KB | 240 | 2025-06-19 19:37:20 |
#include<bits/stdc++.h> using namespace std; int main(){ int a=0,b=0; int sum=0; for(int i=1;;i<=1000;i++){ a++; b++; if(a==b){ sum++; } if(a==20){ a=0; } if(b==30){ b=0; } } return 0; }
Main.cc: In function 'int main()':
Main.cc:6:16: warning: for increment expression has no effect [-Wunused-value]
for(int i=1;;i<=1000;i++){
^
Main.cc:6:22: error: expected ')' before ';' token
for(int i=1;;i<=1000;i++){
^
Main.cc:6:23: error: 'i' was not declared in this scope
for(int i=1;;i<=1000;i++){
^
Main.cc:4:6: warning: unused variable 'a' [-Wunused-variable]
int a=0,b=0;
^
Main.cc:4:10: warning: unused variable 'b' [-Wunused-variable]
int a=0,b=0;
^
Main.cc:5:6: warning: unused variable 'sum' [-Wunused-variable]
int sum=0;
^