4 solutions
-
0
#include <stdio.h> #include <algorithm> #include <math.h> #include <vector> #include <iostream> using namespace std; int n; int main() { scanf("%d",&n); int m=n,ans=0; while(n) { int tmp=n%10; ans+=tmp*tmp*tmp; n/=10; } if(ans==m) printf("TRUE\n"); else printf("FALSE\n"); return 0; }
- 1
Information
- ID
- 42
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 5
- Tags
- # Submissions
- 755
- Accepted
- 273
- Uploaded By