LintCode Python 统计数字

来源:互联网 发布:淘宝联盟pid怎么设置 编辑:程序博客网 时间:2024/05/21 02:33
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

原创粉丝点击