Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
98526 | 秦浩然 | 100~999的水仙花数 | C++ | Compile Error | 0 MS | 0 KB | 300 | 2024-11-23 11:15:40 |
#include<iostream> using namespace std; int main(){ int n,a,b,c; for(int i=100;i<=999;i++){ n=i; a=n%10; b=n/10%10; c=n/100%10; if(a*a*a+b*b*b+c*c*c == n;){ } cout<<n<<" "; } return 0; }
Main.cc: In function 'int main()': Main.cc:10:34: error: expected ')' before ';' token if(a*a*a+b*b*b+c*c*c == n;){ ^ Main.cc:10:35: error: expected primary-expression before ')' token if(a*a*a+b*b*b+c*c*c == n;){ ^