| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 72462 | 黄枳润 | 15相同数的次数 | C++ | Compile Error | 0 MS | 0 KB | 249 | 2024-05-07 19:15:02 |
#include<iostream> using namespace std; int main() { int i,j,n,m=0; for(n=1;n<=1000;n++){ for(i=1;j=1;i<=20;j<=30;i++;j++){ if(i==j){ m+=1; } } cout<<m; return 0; }
Main.cc: In function 'int main()':
Main.cc:7:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
for(i=1;j=1;i<=20;j<=30;i++;j++){
^
Main.cc:7:22: warning: for increment expression has no effect [-Wunused-value]
for(i=1;j=1;i<=20;j<=30;i++;j++){
^
Main.cc:7:26: error: expected ')' before ';' token
for(i=1;j=1;i<=20;j<=30;i++;j++){
^
Main.cc:7:28: warning: statement has no effect [-Wunused-value]
for(i=1;j=1;i<=20;j<=30;i++;j++){
^
Main.cc:7:40: error: expected ';' before ')' token
for(i=1;j=1;i<=20;j<=30;i++;j++){
^
Main.cc:14:1: error: expected '}' at end of input
}
^
Main.cc:5:15: warning: unused variable 'm' [-Wunused-variable]
int i,j,n,m=0;
^
Main.cc:14:1: error: expected '}' at end of input
}
^