1
2
3
4
5
6
7
8
9
10
11
12
13
|
def solution():
num = int(input())
hansu_count = 0
for i in range(1, num+1):
if i <= 99:
hansu_count += 1
else:
hansu = list(map(int, str(i)))
if hansu[0] - hansu[1] == hansu[1] - hansu[2]:
hansu_count += 1
return hansu_count
print(solution())
|
간단히 풀었습니다.
반응형
'BOJ' 카테고리의 다른 글
Baekjoon #2675번 문자열반복 Python (0) | 2020.10.05 |
---|---|
Baekjoon #10809번 알파벳찾기 Python (0) | 2020.10.05 |
Baekjoon #11654번 문자열 아스키코드 Python (0) | 2020.10.05 |
Baekjoon #11720번 숫자의 합 Python (0) | 2020.10.05 |
Baekjoon #2884번 Python (0) | 2020.10.05 |