| 比赛 | 普及组水题赛(语言题赛) | 评测结果 | AAAAA |
|---|---|---|---|
| 题目名称 | 水仙花数 | 最终得分 | 100 |
| 用户昵称 | hzoi55223 | 运行时间 | 0.002 s |
| 代码语言 | C++ | 内存使用 | 0.31 MiB |
| 提交时间 | 2014-10-14 17:51:40 | ||
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
freopen("daff.in","r",stdin);
freopen("daff.out","w",stdout);
int n,m;
int tot=0;
int a,b,c;
scanf("%d",&n);
m=n;
a=n%10;
n/=10;
b=n%10;
n/=10;
c=n;
tot=a*a*a+b*b*b+c*c*c;
if(tot==m)
{
printf("TRUE");
}
else
{
printf("FALSE");
}
return 0;
}