# -*- coding:utf-8 -*-
class Solution:
def NumberOf1Between1AndN_Solution(self, n):
# write code here
res=''
for i in range(1,n+1):
res+=str(i)
return res.count('1')

# -*- coding:utf-8 -*-
class Solution:
def NumberOf1Between1AndN_Solution(self, n):
# write code here
res=''
for i in range(1,n+1):
res+=str(i)
return res.count('1')