Submit Info #7444

Problem Lang User Status Time Memory
Montmort Number python3 Eki1009 AC 634 ms 59.89 MiB

ケース詳細
Name Status Time Memory
example_00 AC 280 ms 11.61 MiB
example_01 AC 379 ms 42.61 MiB
max_00 AC 622 ms 59.50 MiB
max_01 AC 617 ms 59.64 MiB
max_02 AC 634 ms 59.89 MiB
random_00 AC 467 ms 49.18 MiB
random_01 AC 491 ms 50.32 MiB
random_02 AC 502 ms 52.56 MiB
random_03 AC 461 ms 50.08 MiB
random_04 AC 568 ms 56.36 MiB

n, m = map(int, input().split()) U = 10**6 B = [0]*U B[1] = 1%m for i in range(2, U): B[i] = i * (B[i-1] + B[i-2]) B[i] %= m print(*B[:n])