Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
96571 王思颜 水仙花数II C++ Compile Error 0 MS 0 KB 322 2024-11-09 11:21:56

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:18:2: error: expected ';' before '}' token
  }
  ^