結果

問題 No.657 テトラナッチ数列 Easy
ユーザー _matumo__matumo_
提出日時 2020-07-23 22:58:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 492 ms / 2,000 ms
コード長 146 bytes
コンパイル時間 519 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 15,680 KB
最終ジャッジ日時 2023-09-06 03:04:33
合計ジャッジ時間 9,579 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 437 ms
15,624 KB
testcase_01 AC 436 ms
15,608 KB
testcase_02 AC 440 ms
15,552 KB
testcase_03 AC 438 ms
15,568 KB
testcase_04 AC 435 ms
15,480 KB
testcase_05 AC 485 ms
15,564 KB
testcase_06 AC 433 ms
15,680 KB
testcase_07 AC 432 ms
15,604 KB
testcase_08 AC 431 ms
15,560 KB
testcase_09 AC 484 ms
15,668 KB
testcase_10 AC 492 ms
15,572 KB
testcase_11 AC 481 ms
15,616 KB
testcase_12 AC 486 ms
15,564 KB
testcase_13 AC 479 ms
15,472 KB
testcase_14 AC 485 ms
15,560 KB
testcase_15 AC 484 ms
15,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=1000000
a=[0]*N
a[3]=1
for i in range(4,N):
    a[i]=(a[i-1]+a[i-2]+a[i-3]+a[i-4])%17
for _ in range(int(input())):
    print(a[int(input())-1])
0