hdu 2010 水仙花数
来源:互联网 发布:搞笑特效软件 编辑:程序博客网 时间:2024/06/05 18:26
和poj格式稍稍不同;
#include <cstdio>#include <cmath>#include <iostream>#include <cstring>#include <algorithm>#include <queue>#include <stack>#include <vector>#include <map>#include <numeric>#include <set>#include <string>#define INF 0x3f3f3f3ftypedef long long LL;using namespace std;int m,n;bool shui(int x){ int s=0,y=x; while (y){ s+=(y%10)*(y%10)*(y%10); y/=10; } if (x==s) return true; else return false;}int main(){ while (~scanf ("%d%d",&m,&n)){ int k=1,q=0; for (int i=m;i<=n;i++) { if (!q&&shui(i)) {printf ("%d",i);q=1;k=0;continue;} if (shui(i)) {printf (" %d",i);k=0;} } printf (k?"no\n":"\n"); }return 0;}
1 0
- hdu 2010 水仙花数
- HDU 2010 水仙花数
- HDU 2010 水仙花数
- HDU 2010 水仙花数
- hdu 2010 水仙花数
- HDU 2010 水仙花数
- HDU 2010 - 水仙花数
- HDU 2010 水仙花数。
- HDU 2010 水仙花数
- [hdu 2010] 水仙花数
- HDU-2010 水仙花数
- HDu 2010 水仙花数
- HDU 2010 水仙花数
- HDU 2010 水仙花数
- hdu 2010 水仙花数
- hdu 2010 水仙花数
- HDU 2010 水仙花数
- hdu 2010 水仙花数
- Python学习笔记:Python字符编码问题的经验小结
- CCF201409-5 拼图(30分)
- 用原生JS写无缝轮播
- Xshell实现Windows上传文件到Linux主机
- JSP与Servlet的参数传递接收
- hdu 2010 水仙花数
- Spark On YARN自动调整Executor数量配置
- Selenium2自动化测试模型
- shrinkResources 的使用
- Lesson11-15
- 风口的猪---小米笔试题
- Log Structured Merge Trees(LSM) 原理
- Unicode学习笔记
- 将jpg图像转换成yuv420p格式