Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
52685 | wuzhiyan | 水仙花数 | C++ | Accepted | 0 MS | 248 KB | 219 | 2024-10-11 23:12:00 |
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; for(int x=100;x<=999;x++) { a=x%10,b=x/10%10,c=x/100; if(x==a*a*a+b*b*b+c*c*c) cout<<x<<endl; } return 0; }