HDU——2010—— 水仙花数
来源:互联网 发布:淘宝店铺怎样快速升钻 编辑:程序博客网 时间:2024/05/21 17:51
#include <iostream>#include <cmath>using namespace std;int main(){ int n,m; int flag,count; while(cin>>n>>m) { flag=count=0; if(n>m) break; for(int i=n; i<=m; i++) { double sum=pow(i%10,3.0)+pow((i/10)%10,3.0)+pow((i/100)%10,3.0); if(i==sum&&flag==0) { cout<<sum; count++; flag=1; } else if(i==sum&&flag==1) { cout<<" "<<sum; count++; } } if(count==0) cout<<"no"; cout<<endl; } return 0;}
- HDU——2010水仙花数
- HDU ——2010 水仙花数
- HDU——2010—— 水仙花数
- 2010——水仙花数
- 水仙花数——
- C—水仙花数
- F—水仙花数
- hdu2010——水仙花数
- 水仙花数——java
- ACM练习—水仙花数
- hdu 2010 水仙花数
- HDU 2010 水仙花数
- HDU 2010 水仙花数
- HDU 2010 水仙花数
- hdu 2010 水仙花数
- HDU 2010 水仙花数
- HDU 2010 - 水仙花数
- HDU 2010 水仙花数。
- HDU——2011 ——多项式求和
- uva 10106 Product(高精度乘法)
- DateAndTime.java
- inotify使用
- SG-UAP平台简介
- HDU——2010—— 水仙花数
- rails中模型的关联关系 一对一、一对多、多对多及named_scope
- Look and Say 序列的Java实现
- 修改Chrome浏览器默认背景颜色为豆沙绿护眼色
- JAVA中switch能否用在byte上?能否用在long上?能否用在string上?
- HDU——2009——求数列的和
- DEV控件gridview中怎么添加行的ToolTip提示
- 通过.class文件查看JDK版本
- uva 465 Overflow(借助double型进行比较)