結果

問題 No.53 悪の漸化式
ユーザー yuruhiyayuruhiya
提出日時 2020-03-27 19:37:50
言語 Ruby
(3.3.0)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 124 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 11,280 KB
実行使用メモリ 15,604 KB
最終ジャッジ日時 2023-08-30 16:45:31
合計ジャッジ時間 2,479 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,232 KB
testcase_01 AC 77 ms
15,156 KB
testcase_02 AC 76 ms
15,288 KB
testcase_03 AC 75 ms
15,120 KB
testcase_04 AC 79 ms
15,248 KB
testcase_05 AC 75 ms
15,268 KB
testcase_06 AC 78 ms
15,236 KB
testcase_07 AC 75 ms
15,300 KB
testcase_08 AC 76 ms
15,092 KB
testcase_09 AC 76 ms
15,320 KB
testcase_10 AC 76 ms
15,228 KB
testcase_11 AC 76 ms
15,128 KB
testcase_12 AC 75 ms
15,176 KB
testcase_13 AC 76 ms
15,604 KB
testcase_14 AC 77 ms
15,568 KB
testcase_15 AC 77 ms
15,336 KB
testcase_16 AC 78 ms
15,552 KB
testcase_17 AC 76 ms
15,404 KB
testcase_18 AC 77 ms
15,464 KB
testcase_19 AC 77 ms
15,572 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a, b = Rational(4), Rational(3)
gets.to_i.times do |i|
    a, b = b, (19 * b - 12 * a) / 4
end
puts sprintf("%.12f", a.to_f)
0