Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
115106 刘佳宇 水仙花数II C++ Compile Error 0 MS 0 KB 662 2025-03-29 11:40:43

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int m,n; cin>>m>>n; for(int k=1;k<=9;k++){ for(int j=0;j<=9;j++){ for(int i=0;i<=9;i++){ int t= k*100+j*10+i; if(t==k*k*k+i*i*i+j*j*j&&t>=m&&t<=n){ cout<<k<<j<<i<<" "; } } } } cout<<"no"; return 0; } #include<bits/stdc++.h> using namespace std; int main(){ int m,n; cin>>m>>n; for(int k=1;k<=9;k++){ for(int j=0;j<=9;j++){ for(int i=0;i<=9;i++){ int t= k*100+j*10+i; if(t==k*k*k+i*i*i+j*j*j&&t>=m&&t<=n){ cout<<k<<j<<i<<" "; } } } } cout<<"no"; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:25:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:3:5: note: 'int main()' previously defined here
 int main(){
     ^