結果

問題 No.657 テトラナッチ数列 Easy
ユーザー iqalorieiqalorie
提出日時 2018-03-02 23:05:23
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 480 ms / 2,000 ms
コード長 189 bytes
コンパイル時間 624 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 16,768 KB
最終ジャッジ日時 2023-09-04 06:38:40
合計ジャッジ時間 9,293 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 447 ms
16,072 KB
testcase_01 AC 446 ms
15,964 KB
testcase_02 AC 444 ms
15,960 KB
testcase_03 AC 448 ms
16,056 KB
testcase_04 AC 449 ms
15,960 KB
testcase_05 AC 480 ms
16,384 KB
testcase_06 AC 453 ms
15,956 KB
testcase_07 AC 445 ms
16,084 KB
testcase_08 AC 444 ms
15,932 KB
testcase_09 AC 470 ms
16,684 KB
testcase_10 AC 466 ms
16,768 KB
testcase_11 AC 467 ms
16,760 KB
testcase_12 AC 475 ms
16,728 KB
testcase_13 AC 470 ms
16,756 KB
testcase_14 AC 469 ms
16,576 KB
testcase_15 AC 479 ms
16,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
t=[int(input()) for i in range(N)]
s=[0,0,0,1]
for i in range(10**6):
    tt=s[0+i]+s[1+i]+s[2+i]+s[3+i]
    s.append(tt%17)
for j in range(N):    
        print(s[t[j]-1])
0