| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 129530 | 黄俊然 | 14慈善募捐 | C++ | Compile Error | 0 MS | 0 KB | 413 | 2025-08-27 20:13:00 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n; double a,h; cin>>n>>a; for(int i=1;;i<=n;i++){ if(h>n){ break; } h+=a; } return 0; }
Main.cc: In function 'int main()':
Main.cc:11:19: warning: for increment expression has no effect [-Wunused-value]
for(int i=1;;i<=n;i++){
^
Main.cc:11:22: error: expected ')' before ';' token
for(int i=1;;i<=n;i++){
^
Main.cc:11:23: error: 'i' was not declared in this scope
for(int i=1;;i<=n;i++){
^
Main.cc:9:14: warning: unused variable 'h' [-Wunused-variable]
double a,h;
^