| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 98521 | 秦浩然 | 100~999的水仙花数 | C++ | Compile Error | 0 MS | 0 KB | 383 | 2024-11-23 11:14:53 |
#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;){ //continue; //跳过本次循环 //break; //退出循环(结束循环) } 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;){
^