清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
# -*- coding:utf-8 -*- class Solution: def NumberOf1Between1AndN_Solution(self, n): count = 0 for item in range(1,n+1): pstr = str(item) count += pstr.count('1') return count
2014/10/22 47078
清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
# -*- coding:utf-8 -*- class Solution: def NumberOf1Between1AndN_Solution(self, n): count = 0 for item in range(1,n+1): pstr = str(item) count += pstr.count('1') return count