結果

問題 No.553 AlphaCoder Rating
ユーザー finefine
提出日時 2017-08-11 23:02:56
言語 Ruby
(3.3.0)
結果
AC  
実行時間 82 ms / 1,500 ms
コード長 326 bytes
コンパイル時間 239 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,544 KB
最終ジャッジ日時 2024-04-20 23:22:43
合計ジャッジ時間 2,243 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
12,416 KB
testcase_01 AC 79 ms
12,288 KB
testcase_02 AC 80 ms
12,544 KB
testcase_03 AC 80 ms
12,544 KB
testcase_04 AC 80 ms
12,288 KB
testcase_05 AC 79 ms
12,288 KB
testcase_06 AC 78 ms
12,544 KB
testcase_07 AC 81 ms
12,416 KB
testcase_08 AC 80 ms
12,288 KB
testcase_09 AC 81 ms
12,544 KB
testcase_10 AC 79 ms
12,416 KB
testcase_11 AC 80 ms
12,544 KB
testcase_12 AC 80 ms
12,288 KB
testcase_13 AC 79 ms
12,416 KB
testcase_14 AC 77 ms
12,416 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

include Math
n = gets.to_i
tmp = 1
tmp2 = 1
hoge = 0
foo = 0
bar = 0
1.upto(n) do |i|
    r = gets.to_f
    tmp *= 0.9
    tmp2 *= 0.81
    hoge += (2 ** (r / 800)) * tmp
    foo += tmp
    bar += tmp2
end
ans = 800 * log2(hoge / foo)
tmp = 1 / (19 ** 0.5)
ans -= ((bar ** 0.5 / foo - tmp) / (1 - tmp)) * 1200
p ans.round.to_i
0