| 记录编号 | 127064 | 评测结果 | AAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 368.水仙花数 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.003 s | ||
| 提交时间 | 2014-10-14 20:42:19 | 内存使用 | 0.31 MiB | ||
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int a,b,c,d,x;
freopen("daff.in","r",stdin);
freopen("daff.out","w",stdout);
cin>>x;
a=x/100;
b=x/10-10*a;
c=x-100*a-10*b;
d=a*a*a+b*b*b+c*c*c;
if(x==d){
cout<<"TRUE"<<endl;
}
else if(x!=d){
cout<<"FALSE"<<endl;
}
return 0;
}