結果

問題 No.657 テトラナッチ数列 Easy
ユーザー 0918nobita0918nobita
提出日時 2018-03-19 09:16:53
言語 Ruby
(3.3.0)
結果
MLE  
実行時間 -
コード長 190 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 11,488 KB
実行使用メモリ 817,024 KB
最終ジャッジ日時 2023-08-30 03:33:39
合計ジャッジ時間 3,383 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,000 KB
testcase_01 AC 84 ms
15,232 KB
testcase_02 AC 81 ms
15,044 KB
testcase_03 AC 83 ms
15,240 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 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

Q = gets.to_i
T = [0, 0, 0, 1]
n = []

for i in 1..Q
    n.push(gets.to_i)
end
for i in 5..n.max
    T.push(T[i - 2] + T[i - 3] + T[i - 4] + T[i - 5])
end

n.each {|ni| puts T[ni - 1] % 17 }
0