結果

問題 No.553 AlphaCoder Rating
ユーザー No-RaNo-Ra
提出日時 2017-08-11 23:44:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 1,500 ms
コード長 803 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,848 KB
実行使用メモリ 8,688 KB
最終ジャッジ日時 2023-08-02 23:59:33
合計ジャッジ時間 1,372 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,664 KB
testcase_01 AC 15 ms
8,608 KB
testcase_02 AC 16 ms
8,072 KB
testcase_03 AC 16 ms
8,528 KB
testcase_04 AC 16 ms
8,632 KB
testcase_05 AC 16 ms
8,556 KB
testcase_06 AC 15 ms
8,040 KB
testcase_07 AC 16 ms
8,076 KB
testcase_08 AC 16 ms
8,104 KB
testcase_09 AC 16 ms
8,528 KB
testcase_10 AC 16 ms
8,532 KB
testcase_11 AC 16 ms
8,532 KB
testcase_12 AC 16 ms
8,688 KB
testcase_13 AC 16 ms
8,512 KB
testcase_14 AC 15 ms
8,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

N = int(input())
RPref = []
for i in range(N):
    RPref.append(input())

Fn_inf = 0.22941573387056197


def Fn(N):
    molecule = 0
    denominator = 0
    for i in range(N):
        molecule += math.pow(0.81, i)
        denominator += math.pow(0.9, i)
    return math.sqrt(molecule) / denominator
Fn


def fn(n):
    molecule = Fn(n) - Fn_inf
    denominator = Fn(1) - Fn_inf
    return (molecule / denominator) * 1200
fn


def gx(x):
    return math.pow(2.0, (x/800))
gx


def invgx(x):
    return 800 * math.log(x) / math.log(2.0)
invgx


def Rating(n):
    molecule = 0
    denominator = 0
    for i in range(n):
        molecule += gx(int(RPref[i]))*math.pow(0.9, i)
        denominator += math.pow(0.9, i)
    return (invgx(molecule / denominator) - fn(n))
Rating


print(Rating(N))
0