complete 1149, 1904, 9461

This commit is contained in:
2021-02-19 01:59:58 +09:00
parent 1b7ceef1da
commit adbd4d1a3f
3 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
N = int(input())
M = [1, 2] + [0 for _ in range(1000000 - 1 - 1)]
for i in range(2, N):
M[i] = (M[i - 1] + M[i - 2]) % 15746
print(M[N - 1])