| 比赛 | 普及组水题赛(语言题赛) | 评测结果 | WWWWA |
|---|---|---|---|
| 题目名称 | 水仙花数 | 最终得分 | 20 |
| 用户昵称 | 微凉徒眸意 | 运行时间 | 0.001 s |
| 代码语言 | C++ | 内存使用 | 0.31 MiB |
| 提交时间 | 2014-10-14 19:26:46 | ||
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
freopen("daff.in","r",stdin);
freopen("daff.out","w",stdout);
int a,b,c,d,e;
cin>>d;
if(d>=100 & d<1000){
a=d/100;
if(a>=1 & a<=9){
b=(d-100*a)/10;
if(b>=0 & b<=9){
c=d-100*a-10*b;
if(c>=0 & c<=9){
e=a*a*a+b*b*b+c*c*c;
}
}
}
}
if(e==d){
cout<<"TURE";
}
else
{
cout<<"FALSE";
}
return 0;
}