Chinaunix首页 | 论坛 | 博客
  • 博客访问: 22341
  • 博文数量: 69
  • 博客积分: 1545
  • 博客等级: 上尉
  • 技术积分: 735
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-03 14:17
个人简介

fdsfdsfdsfds

文章分类

全部博文(69)

文章存档

2014年(8)

2012年(61)

我的朋友

分类: C/C++

2012-04-05 13:18:24


import java.util.*;

public class Main{
  public static void main(String args[]){
  Scanner cin=new Scanner(System.in);
  int tmp=-1;
  while(true){
    tmp=cin.nextInt();
    if(tmp==0) break;
    int a=tmp/100,b=(tmp-100*a)/10,c=tmp%10;
    if(Math.pow(a,3)+Math.pow(b,3)+Math.pow(c,3)==tmp)
     System.out.println("Yes");
    else
     System.out.println("No");
  }
}
}


 
#include
using namespace std;
int main()
{
int a;
while(1)
{
cin>>a;
if(a==0) break;
cout<<((a==153||a==370||a==371||a==407)?"Yes":"No")<
}
}        
阅读(80) | 评论(0) | 转发(0) |
0

上一篇:hdu31 全是水题

下一篇:hdu 41 水题

给主人留下些什么吧!~~