摘要: 1.题目描述 Count the number of k's between 0 and n. k can be 0 - 9. 计算数字 k 在 0 到 n 中的出现的次数,k 可能是 0~9 的一个值。 2.样例 2.样例 样例 1: 输入: k = 1, n = 1 输出: 1 解释: 在 [0 阅读全文
posted @ 2019-04-14 22:54 Aucip 阅读(1441) 评论(0) 推荐(0)
摘要: 1.丑数说明: Ugly number is a number that only have factors 2, 3 and 5. 我们把只含有因子2、3、5的数称为丑数(规定1为最小的丑数。 例如1、 2、 3、 4、 5、 6、 8、 12等都是丑数, 7、 14、 22等不是丑数; 2.编程 阅读全文
posted @ 2019-04-12 22:42 Aucip 阅读(838) 评论(0) 推荐(1)
摘要: 问题描述:输入一个数组求出数组中指定的第k大元并输出。 样例 样例 Example 1: Input: n = 1, nums = [1,3,4,2] Output: 4 Example 2: Input: n = 3, nums = [9,3,2,4,8] Output: 4 Example 1: 阅读全文
posted @ 2019-04-11 12:04 Aucip 阅读(321) 评论(0) 推荐(0)