본문 바로가기
알고리즘/백준

백준-1904번(01타일)-python3

by nyeongha 2023. 11. 24.
tile={1:1,2:2}
def ti(t):
    for y in range(3,t+1):
        tile[y]=(tile[y-1]+tile[y-2])%15746
    return tile[t]
a=int(input())
print(ti(a))

'알고리즘 > 백준' 카테고리의 다른 글

백준-1920번(수 찾기)-python3  (0) 2023.11.24
백준-1912번(연속합)-python3  (0) 2023.11.24
백준-1874번(스택 수열)-python3  (0) 2023.11.24
백준-1789번(수들의 합)-python3  (0) 2023.11.24
백준-1764번(듣보잡)-python3  (0) 2023.11.24