Files
Algorithm/백준/Bronze/27494. 2023년은 검은 토끼의 해/2023년은 검은 토끼의 해.py

19 lines
311 B
Python

import sys
input = sys.stdin.readline
n = int(input())
target = '2023'
count = 0
for i in range(2023, n + 1):
s = str(i)
idx = 0
for c in s:
if c == target[idx]:
idx += 1
if idx == 4:
count += 1
break
print(count)