Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
118632 谭哲曦 100~999的水仙花数 C++ Compile Error 0 MS 0 KB 323 2025-05-08 23:10:14

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int main(){ int ge,shi,bai,i; for(i=100;i<1000;i++){ bai=i/100; shi=(i/10)%10; ge=i%10; if(bai*bai*bai+shi*shi*shi+ge*ge*ge==i) cout<<i<<""; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:15: error: a function-definition is not allowed here before '{' token
     int main(){
               ^
Main.cc:14:5: error: expected '}' at end of input
     }
     ^