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