Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
157324 余建成 水仙花数II C++ Compile Error 0 MS 0 KB 257 2026-07-22 14:31:39

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int n,m,c=0; cin>>m>>n; for(int i=m;i<=n;i++){ int d=i/100; int s=i/10%10; int g=i%10; if(b*b*b+s*s*s+g*g*g==i){ cout<<i<<' '; c++; } } if(c==0)cout<<"no"; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:6: error: 'b' was not declared in this scope
   if(b*b*b+s*s*s+g*g*g==i){
      ^
Main.cc:7:7: warning: unused variable 'd' [-Wunused-variable]
   int d=i/100;
       ^