Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64608 殷震轩 水仙花数II C++ Compile Error 0 MS 0 KB 301 2024-01-21 17:09:18

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,m,p=0; cin>>m>>n; for(int i=m;i<=n;i++){ q=(i/10%10)*(i/10%10)*(i/10%10); c=(i/100*(i/100)*(i/100; y=(i%10)*(i%10)*(i%10); if(i==q+c+y){ cout<<i<<" "; p=1; } } cout<<"No"; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:3: error: 'q' was not declared in this scope
   q=(i/10%10)*(i/10%10)*(i/10%10);
   ^
Main.cc:8:3: error: 'c' was not declared in this scope
   c=(i/100*(i/100)*(i/100;
   ^
Main.cc:8:26: error: expected ')' before ';' token
   c=(i/100*(i/100)*(i/100;
                          ^
Main.cc:8:26: error: expected ')' before ';' token
Main.cc:9:3: error: 'y' was not declared in this scope
   y=(i%10)*(i%10)*(i%10);
   ^