摘要: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 阅读全文
posted @ 2017-03-13 03:24 CodesKiller 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Description: Count the number of prime numbers less than a non-negative number, n. 本题不知道为什么,不可以使用hashtable来做,如果用了就超时了,只能用数组来存储,代码如下: 阅读全文
posted @ 2017-03-13 01:55 CodesKiller 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For exa 阅读全文
posted @ 2017-03-13 01:32 CodesKiller 阅读(106) 评论(0) 推荐(0) 编辑