結果

問題 No.657 テトラナッチ数列 Easy
ユーザー tanukidontanukidon
提出日時 2018-03-22 20:10:31
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 205 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 11,432 KB
実行使用メモリ 16,172 KB
最終ジャッジ日時 2023-09-07 01:44:48
合計ジャッジ時間 2,753 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
14,988 KB
testcase_01 AC 79 ms
15,168 KB
testcase_02 AC 80 ms
14,996 KB
testcase_03 AC 77 ms
15,304 KB
testcase_04 RE -
testcase_05 AC 116 ms
15,836 KB
testcase_06 RE -
testcase_07 AC 77 ms
14,988 KB
testcase_08 RE -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.chomp.to_i
a = []
n.times do
a << gets.chomp.to_i
end
b=[nil,0,0,0,1,1,2,4,8,15]
if a.max > 9
(a.max-9).times do |i|
c = 0
c =  a[9+i]*2 - a[5+i]
b <<  c
end
end
a.each do |i|
    p b[i] % 17
end
0