标签:整数 编号 def code log get div pre i+1
def getMark(k): sum=0 for i in range(1, 100000): for j in range(1, i+1): if j <10: sum +=1 elif j<100: sum += 2 elif j <1000: sum += 3 elif j <10000: sum += 4 elif j <100000: sum += 5 else: sum+=6 if (sum-k) <len(str(j)): mark=0 for s in str(j): mark+=1 l=len(str(j))-mark if (sum-k) == l: return s
标签:整数 编号 def code log get div pre i+1
原文地址:http://www.cnblogs.com/Luzenrocy/p/7434671.html