POJ 1338 Ugly Numbers
来源:互联网 发布:淘宝如何删除我的评价 编辑:程序博客网 时间:2024/05/17 20:29
Description
Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, ...
shows the first 10 ugly numbers. By convention, 1 is included.
Given the integer n,write a program to find and print the n'th ugly number.
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, ...
shows the first 10 ugly numbers. By convention, 1 is included.
Given the integer n,write a program to find and print the n'th ugly number.
Input
Each line of the input contains a postisive integer n (n <= 1500).Input is terminated by a line with n=0.
Output
For each line, output the n’th ugly number .:Don’t deal with the line with n=0.
Sample Input
1290
Sample Output
1210
- POJ 1338 Ugly Numbers
- POJ 1338 Ugly Numbers
- POJ 1338 ugly numbers
- poj 1338 Ugly Numbers
- POJ 1338 Ugly Numbers
- POJ-1338-Ugly Numbers
- POJ 1338 Ugly Numbers
- poj-1338Ugly Numbers
- POJ 1338 - Ugly Numbers
- POJ 1338 Ugly Numbers
- poj 1338 ugly numbers
- Ugly Numbers(poj 1338)
- poj 1338 Ugly Numbers
- poj-1338-Ugly Numbers
- poj 1338 Ugly Numbers
- poj-1338-Ugly Numbers
- poj-1338-Ugly Numbers
- poj 1338 Ugly Numbers
- java 导出 Excel 报表
- 什么是BSS段
- Tutorials1------open flash chart
- 洗牌算法
- 第一天的博客
- POJ 1338 Ugly Numbers
- windows操作系统启动后SDE的服务无法自动启动的解决方法
- 读取Properties的配置文件的信息
- 赛艇程序文档说明之二:frmAnalysis1模块级变量定义说明
- word及相关(mathtype,endnote等)使用备忘
- 照葫芦画瓢的BFS,poj3278
- sdfadsf
- 正则表达式小探
- 用Java实现Server-Client结构的聊天系统