Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113598 黎瑾萱 水仙花数II C++ Accepted 1 MS 272 KB 301 2025-03-16 10:32:47

Tests(10/10):


Code:

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