1 solutions
-
0
C :
#include<stdio.h> main() { int i,t,a,b,c; for(i=100;i<999;i++) { t=i; c=t%10; t/=10; b=t%10; t/=10; a=t%10; t/=10; if(i==(a*a*a+b*b*b+c*c*c)) printf("%d\n",i); } }C++ :
#include<bits/stdc++.h> using namespace std; int main() { cout<<"153\n370\n371\n407"; return 0; }
- 1
Information
- ID
- 19047
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By