結果

問題 No.53 悪の漸化式
ユーザー gigurururugigurururu
提出日時 2014-11-07 13:12:54
言語 Ruby
(3.2.2)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 84 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 11,376 KB
実行使用メモリ 15,616 KB
最終ジャッジ日時 2023-08-26 23:08:58
合計ジャッジ時間 3,011 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,232 KB
testcase_01 AC 77 ms
15,284 KB
testcase_02 AC 77 ms
15,260 KB
testcase_03 AC 75 ms
15,228 KB
testcase_04 AC 71 ms
15,280 KB
testcase_05 AC 76 ms
15,248 KB
testcase_06 AC 74 ms
15,044 KB
testcase_07 AC 74 ms
15,028 KB
testcase_08 AC 71 ms
15,184 KB
testcase_09 AC 72 ms
15,256 KB
testcase_10 AC 73 ms
15,016 KB
testcase_11 AC 73 ms
15,116 KB
testcase_12 AC 73 ms
15,256 KB
testcase_13 AC 72 ms
15,304 KB
testcase_14 AC 73 ms
15,616 KB
testcase_15 AC 75 ms
15,484 KB
testcase_16 AC 77 ms
15,304 KB
testcase_17 AC 75 ms
15,336 KB
testcase_18 AC 76 ms
15,384 KB
testcase_19 AC 76 ms
15,476 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a=[4,3]
n=gets.to_i
(2..n).each{|i|a[i]=(19*a[i-1]-12*a[i-2]).quo(4)}
p a[n].to_f
0