結果

問題 No.657 テトラナッチ数列 Easy
ユーザー maimai
提出日時 2018-03-02 22:25:59
言語 Ruby
(3.3.0)
結果
AC  
実行時間 277 ms / 2,000 ms
コード長 150 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 11,356 KB
実行使用メモリ 23,412 KB
最終ジャッジ日時 2023-09-03 22:45:31
合計ジャッジ時間 5,167 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 229 ms
23,148 KB
testcase_01 AC 230 ms
23,220 KB
testcase_02 AC 230 ms
23,012 KB
testcase_03 AC 229 ms
23,244 KB
testcase_04 AC 230 ms
23,092 KB
testcase_05 AC 270 ms
23,412 KB
testcase_06 AC 230 ms
23,244 KB
testcase_07 AC 228 ms
23,252 KB
testcase_08 AC 230 ms
23,240 KB
testcase_09 AC 273 ms
23,396 KB
testcase_10 AC 273 ms
23,400 KB
testcase_11 AC 273 ms
23,208 KB
testcase_12 AC 272 ms
23,232 KB
testcase_13 AC 277 ms
23,400 KB
testcase_14 AC 273 ms
23,396 KB
testcase_15 AC 275 ms
23,232 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

NMAX = 1e6.to_i

t = [0,0,0,1]

NMAX.times do |i|
    t.push (t[-1]+t[-2]+t[-3]+t[-4])%17
end

gets.to_i.times do
    n = gets.to_i
    p t[n-1]
end

0