| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 141088 | 岑思烁 | 100~999的水仙花数 | C++ | Compile Error | 0 MS | 0 KB | 209 | 2025-12-21 11:29:18 |
#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,c,d; for( i=100 ;i<=999;i+=1){ a=i/100; b=i%100/10; c=i%10; if(a*a*a+b*b*b+c*c*c==i)cout<<i<<" "; return 0; }
Main.cc: In function 'int main()':
Main.cc:5:7: error: 'i' was not declared in this scope
for( i=100 ;i<=999;i+=1){
^
Main.cc:4:18: warning: unused variable 'd' [-Wunused-variable]
long long a,b,c,d;
^
Main.cc:11:1: error: expected '}' at end of input
}
^