num = int(input())
count = 0
for i in range(1, num + 1):
if(len(str(i)) == 1 or len(str(i)) == 2):
count += 1
elif(len(str(i)) == 3):
str_i = str(i)
if(int(str_i[0]) - int(str_i[1]) == int(str_i[1]) - int(str_i[2])):
count += 1
elif(i == 1000):
break
print(count)
'# 코딩 문제 관련 > 파이썬' 카테고리의 다른 글
Baekjoon 1152번(python) (0) | 2019.04.28 |
---|---|
Baekjoon 2448번(python) (2) | 2019.04.28 |
Baekjoon 4673번(python) (0) | 2019.04.28 |
Baekjoon 1110번(python) (0) | 2019.04.27 |
Baekjoon 4344번(python) (0) | 2019.04.27 |