結果

問題 No.553 AlphaCoder Rating
ユーザー sue_charosue_charo
提出日時 2017-08-12 00:10:45
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 16 ms / 1,500 ms
コード長 860 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 10,852 KB
実行使用メモリ 8,128 KB
最終ジャッジ日時 2023-08-03 00:18:28
合計ジャッジ時間 1,502 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,000 KB
testcase_01 AC 15 ms
8,000 KB
testcase_02 AC 15 ms
8,048 KB
testcase_03 AC 16 ms
8,036 KB
testcase_04 AC 16 ms
8,028 KB
testcase_05 AC 16 ms
8,040 KB
testcase_06 AC 16 ms
7,968 KB
testcase_07 AC 16 ms
8,128 KB
testcase_08 AC 16 ms
8,040 KB
testcase_09 AC 16 ms
8,040 KB
testcase_10 AC 16 ms
8,108 KB
testcase_11 AC 15 ms
8,044 KB
testcase_12 AC 16 ms
8,044 KB
testcase_13 AC 16 ms
8,040 KB
testcase_14 AC 16 ms
8,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
import math
def II(): return int(input())
def ILI(): return list(map(int, input().split()))


def read():
    N = II()
    RPerf = [II() for __ in range(N)]
    return N, RPerf


def solve(N, RPerf):
    F_inf_upper = math.sqrt(0.81 / (1 - 0.81))
    F_inf_under = 0.9 / (1 - 0.9)
    F_inf = F_inf_upper / F_inf_under

    F_n_upper = math.sqrt(0.81 * (1 - pow(0.81, N)) / (1 - 0.81))
    F_n_under = (0.9 * (1 - pow(0.9, N)) / (1 - 0.9))
    F_n = F_n_upper / F_n_under

    F_1 = 1
    f_n = ((F_n - F_inf) / (F_1 - F_inf)) * 1200

    g_1_upper = 0
    for ind, r in enumerate(RPerf):
        g_1_upper += pow(2, r / 800) * pow(0.9, ind + 1)
    g_1_under = F_n_under

    ans = 800 * math.log2(g_1_upper / g_1_under) - f_n

    return ans


def main():
    params = read()
    print(solve(*params))


if __name__ == "__main__":
    main()
0