随笔分类 -  数论

摘要:Ugly Numbers从小到大生成各个丑数,最小的丑数是1,而对于任意丑数x,2x、3x和5x也都是丑数。这样,就可以用一个优先队列保存所有已生成的丑数,每次取出最小的丑数,生成3个新的丑数。唯一需要注意的是,同一个丑数有多种生成方式,所以需要判断一个丑数是否已经生... 阅读全文
posted @ 2018-04-17 12:39 ACLJW 阅读(105) 评论(0) 推荐(0)
摘要:The decimal expansion of the fraction 1/33 is 0.03, where the 03 is used to indicate that the cycle 03repeats indefinitely with no int... 阅读全文
posted @ 2018-04-06 09:45 ACLJW 阅读(165) 评论(0) 推荐(0)