hdu2010
来源:互联网 发布:淘宝助理韵达模板下载 编辑:程序博客网 时间:2024/06/02 01:58
//很闲,刷水。。。。。
http://acm.hdu.edu.cn/showproblem.php?pid=2010
1 #include<iostream> 2 #include<stdio.h> 3 #include<math.h> 4 #include<stdlib.h> 5 #include<string.h> 6 using namespace std; 7 8 int main() 9 {10 int n,m;11 while(~scanf("%d%d",&n,&m))12 {13 int t;14 if(n>m)15 {16 t=n;17 n=m;18 m=t;19 }20 int flag=0;21 for(int i=n;i<=m;i++)22 {23 int a=i/100;24 int b=i%10;25 int c=i/10%10;26 if(i==a*a*a+b*b*b+c*c*c)27 {28 if(flag==0)29 {30 printf("%d",i);31 flag=1;32 }33 else34 {35 printf(" %d",i);36 }37 }38 }39 if(flag==0)40 printf("no");41 printf("\n");42 }43 return 0;44 }
阅读全文
0 0
- HDU2010
- hdu2010
- HDU2010
- HDU2010
- hdu2010
- hdu2010
- HDU2010
- 水仙花数(hdu2010)
- HDU2010 水仙花数
- Hdu2010水仙花数
- HDU2010 水仙花数
- HDU2010 水仙花数
- HDU2010 水仙花数
- hdu2010——水仙花数
- hdu2010 水仙花数20140812.cpp
- HDU2010 Ice_cream's world I
- (解题报告)HDU2010---水仙花数
- HDU2010省赛集训队选拔赛(校内赛) H
- hdu1021 Fibonacci Again
- 1015. 德才论
- hdu1022 Train Problem I
- Boring隧道掘进机完成首段挖掘_离未来交通还有多远?
- hdu1031 Design T-Shirt
- hdu2010
- hdu2011
- 使用dubbo+zookeper实现服务调用与使用webservice对比
- hdu2012
- POSTGRESQL 存储过程实战
- hdu2013
- Mjpg-streamer移植
- kvm tick中断模拟
- hdu2015