반응형
https://www.acmicpc.net/problem/1065
# @Author YoungMinKim
# baekjoon
N=int(input())
cnt=0
if N<100:
cnt=N
else:
cnt=99
for i in range(100,N+1):
ls = list(str(i))
if int(ls[1]) - int(ls[0]) == int(ls[2]) - int(ls[1]):
cnt+=1
else:
continue
print(cnt)
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 10039 (0) | 2020.08.29 |
---|---|
baekjoon - python - 1929 (0) | 2020.08.28 |
baekjoon - python - 4673 (0) | 2020.08.28 |
baekjoon - python -2839 (0) | 2020.08.28 |
baekjoon - python - 2108 (0) | 2020.08.27 |
댓글