結果

問題 No.553 AlphaCoder Rating
ユーザー nebukuro09nebukuro09
提出日時 2017-08-12 00:02:32
言語 PyPy2
(7.3.13)
結果
AC  
実行時間 71 ms / 1,500 ms
コード長 519 bytes
コンパイル時間 2,172 ms
コンパイル使用メモリ 77,392 KB
実行使用メモリ 77,036 KB
最終ジャッジ日時 2023-08-03 00:13:09
合計ジャッジ時間 4,319 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
76,912 KB
testcase_01 AC 69 ms
76,820 KB
testcase_02 AC 69 ms
76,916 KB
testcase_03 AC 67 ms
76,804 KB
testcase_04 AC 69 ms
76,748 KB
testcase_05 AC 71 ms
76,804 KB
testcase_06 AC 69 ms
77,032 KB
testcase_07 AC 69 ms
76,620 KB
testcase_08 AC 67 ms
76,820 KB
testcase_09 AC 67 ms
76,744 KB
testcase_10 AC 70 ms
76,928 KB
testcase_11 AC 71 ms
76,616 KB
testcase_12 AC 71 ms
76,756 KB
testcase_13 AC 71 ms
76,920 KB
testcase_14 AC 70 ms
77,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import sqrt, log

EPS = 0.5

F1 = 0
F2 = 0
F_inf = 1 / sqrt(19)


def f(n):
    return (sqrt(F1) / F2 - F_inf) / (1 - F_inf) * 1200


def g(x):
    return pow(2, x / 800.0)


def g_inv(x):
    return 800.0 * log(x) / log(2)

gsum = 0

N = input()
for i in xrange(1, N+1):
    RPerf = int(raw_input())
    F1 += pow(0.81, i)
    F2 += pow(0.9, i)
    gsum += g(RPerf) * pow(0.9, i)
    rating = g_inv(gsum / F2) - f(i)

if int(rating + EPS) > int(rating):
    print int(rating) + 1
else:
    print int(rating)
0