class Solution:
# @param k & n two integer
# @return ans a integer
def digitCounts(self, k, n):
L = ''.join([str(i) for i in range(n+1)])
c = L.count(str(k))
return c
LintCode Python 统计数字
最新推荐文章于 2022-03-09 14:08:35 发布