| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 161060 | 王垚植 | 水仙花数II | C++ | Compile Error | 0 MS | 0 KB | 351 | 2026-09-27 17:19:47 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,g,s,b; cin>>a>>b; bool f=0; for (int i=a;i<=b;i++){ g=i%10; s=i/10%10; b=i/100; if (pow(g,3)+pow(s,3)+pow(b,3)==i){ f=1; cout<<i<<" "; } } if (f==0){ cout<<"no"; } return 0; }
Main.cc: In function 'int main()':
Main.cc:4:17: error: redeclaration of 'int b'
int a,b,g,s,b;
^
Main.cc:4:11: note: 'int b' previously declared here
int a,b,g,s,b;
^