
Math
文章平均质量分 53
再见小小ronnie
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode 453. Minimum Moves to Equal Array Elements
/** * sum is the sum of the array, min is the minimum of the array, f is the final value of the m moves * m is # of moves, n is the size of the array * sum + m(n-1) = f*n (1) * min + m = f转载 2017-01-29 09:37:03 · 237 阅读 · 0 评论 -
Leetcode 263. Ugly Number
Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Which means an ugly number is 2^i * 3^j * 5^k * 1 (i,j,k are non-negative integers). Therefore, we can keep dividing the g原创 2017-03-08 12:08:40 · 193 阅读 · 0 评论 -
Leetcode 264. Ugly Number II
An approach is to check every number if it is an ugly number, until we meet the nth ugly number. An efficient way is to construct and enumerate all n ugly number and return the last one. public clas原创 2017-03-10 02:19:46 · 189 阅读 · 0 评论