1126 水仙花数
来源:互联网 发布:收售淘宝店铺 编辑:程序博客网 时间:2024/06/05 16:31
#include<iostream>using namespace std;int main(){int n,i,a,b,c,m=0;cin>>n;for(i=100;i<=n;i++){a=i/100;b=i/10-a*10;c=i%10;if(a*a*a+b*b*b+c*c*c==i){m++;cout<<i<<endl;}}if(m==0)cout<<"No Answer"<<endl;return 0;}
- 1126 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 水仙花数
- 预定义的宏
- 冒泡排序的C++实现及随机数组的产生方法
- Internet Explorer无法打开Internet 站点的原因
- Netty & Mina 入门级总结
- Android学习笔记(1)—— Android架构剖析
- 1126 水仙花数
- oracle 10g rman 备份与恢复 之一
- 什么是编译器
- 【Spring】 Spring 框架名字的由来
- C++第8周项目5 - 扩充String类
- git学习笔记-如何移除或忽略(ignore)已经提交给git管理的文件
- strlen的各种实现
- 函数
- 二维数组定义及动态分配