Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
136109 蔡胤泽 水仙花数II C++ Accepted 2 MS 272 KB 367 2025-11-09 15:45:59

Tests(10/10):


Code:

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