結果

問題 No.553 AlphaCoder Rating
ユーザー ayaoniayaoni
提出日時 2020-12-10 15:33:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 1,500 ms
コード長 834 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 82,128 KB
実行使用メモリ 54,048 KB
最終ジャッジ日時 2023-10-20 00:45:31
合計ジャッジ時間 2,062 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
54,048 KB
testcase_01 AC 36 ms
54,048 KB
testcase_02 AC 35 ms
54,048 KB
testcase_03 AC 35 ms
54,048 KB
testcase_04 AC 36 ms
54,048 KB
testcase_05 AC 36 ms
54,048 KB
testcase_06 AC 35 ms
54,048 KB
testcase_07 AC 39 ms
54,048 KB
testcase_08 AC 35 ms
54,048 KB
testcase_09 AC 35 ms
54,048 KB
testcase_10 AC 36 ms
54,048 KB
testcase_11 AC 35 ms
54,048 KB
testcase_12 AC 35 ms
54,048 KB
testcase_13 AC 35 ms
54,048 KB
testcase_14 AC 35 ms
54,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from math import log2
sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


N = I()
P = [I() for _ in range(N)]

F_N = (sum(0.81**i for i in range(1,N+1)))**.5/sum(0.9**i for i in range(1,N+1))
F_inf = 1/19**.5
f_N = 1200*(F_N-F_inf)/(1-F_inf)


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


def g_inv(y):
    return 800*log2(y)


y = sum(g(P[i-1])*0.9**i for i in range(1,N+1))/sum(0.9**i for i in range(1,N+1))
R = g_inv(y)-f_N
print(int(R+.5))
0