Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98522 殷佳雨萱 100~999的水仙花数 C++ Compile Error 0 MS 0 KB 292 2024-11-23 11:14:59

Tests(0/0):


Code:

#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; }


Run Info:

Main.cc:15:5: error: expected unqualified-id before 'return'
     return 0;
     ^
Main.cc:16:1: error: expected declaration before '}' token
 }
 ^