結果
問題 | No.657 テトラナッチ数列 Easy |
ユーザー | takenta |
提出日時 | 2018-03-02 22:58:04 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 242 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 10,648 KB |
実行使用メモリ | 816,932 KB |
最終ジャッジ日時 | 2023-09-04 05:54:18 |
合計ジャッジ時間 | 3,687 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,872 KB |
testcase_01 | AC | 16 ms
7,808 KB |
testcase_02 | AC | 16 ms
7,804 KB |
testcase_03 | AC | 17 ms
7,824 KB |
testcase_04 | MLE | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
ソースコード
def tetra(n): seed = [0, 0, 0, 1] for _ in range(n - 4): seed.append(sum(seed[-1:-5:-1])) return seed nq = int(input()) qs = [int(input()) for _ in range(nq)] t = tetra(max(qs)) for q in qs: print(t[q - 1] % 17)