結果

問題 No.657 テトラナッチ数列 Easy
ユーザー kwnwsdnckwnwsdnc
提出日時 2018-03-06 16:58:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 615 ms / 2,000 ms
コード長 180 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 11,736 KB
実行使用メモリ 18,536 KB
最終ジャッジ日時 2023-10-19 14:40:02
合計ジャッジ時間 4,436 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,004 KB
testcase_01 AC 30 ms
10,004 KB
testcase_02 AC 31 ms
10,004 KB
testcase_03 AC 31 ms
10,004 KB
testcase_04 AC 556 ms
17,276 KB
testcase_05 AC 56 ms
10,340 KB
testcase_06 AC 30 ms
10,004 KB
testcase_07 AC 29 ms
10,004 KB
testcase_08 AC 570 ms
17,908 KB
testcase_09 AC 57 ms
10,616 KB
testcase_10 AC 63 ms
10,740 KB
testcase_11 AC 63 ms
10,740 KB
testcase_12 AC 112 ms
11,436 KB
testcase_13 AC 599 ms
18,536 KB
testcase_14 AC 590 ms
18,536 KB
testcase_15 AC 615 ms
18,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())
N=[]
for _ in range (Q):
    N.append(int(input()))


T=[0,0,0,0,1]
for _ in range (max(N)-4):
    T+=[sum(T[-4:])%17]
            
for n in N: 
    print(T[n]%17)

0