| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 70516 | 杜奕辰 | 07苹果和虫子 | C++ | Compile Error | 0 MS | 0 KB | 229 | 2024-04-14 15:17:40 |
#include<iostream> using namespace std; int main(){ int n,y,x; cin>>n>>y>>x; int c; if(y%x!=0){ c=y/x+1; }else{ c=y/x; } }if(n<=c){ cout<<0; }else{ cout<<n-c; } return 0; }
Main.cc: In function 'int main()':
Main.cc:6:9: warning: variable 'c' set but not used [-Wunused-but-set-variable]
int c;
^
Main.cc: At global scope:
Main.cc:12:3: error: expected unqualified-id before 'if'
}if(n<=c){
^
Main.cc:14:3: error: expected unqualified-id before 'else'
}else{
^
Main.cc:17:3: error: expected unqualified-id before 'return'
return 0;
^
Main.cc:18:2: error: expected declaration before '}' token
}
^