結果

問題 No.553 AlphaCoder Rating
ユーザー titiatitia
提出日時 2024-03-14 02:41:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 37 ms / 1,500 ms
コード長 482 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2024-03-14 02:41:07
合計ジャッジ時間 2,117 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

from math import log2

N=int(input())
P=[int(input()) for i in range(N)]

def F(n):
    x=0
    y=0

    for i in range(1,n+1):
        x+=0.81**i
        y+=0.9**i

    return (x**(1/2))/y


#for i in range(1,1000):
#    print(F(i))

F_inf=0.22941573387056197

def f(n):
    return (F(n)-F_inf)/(F(1)-F_inf)*1200

def g(x):
    return 2**(x/800)

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

x=0
y=0
for i in range(1,N+1):
    x+=g(P[i-1])*(0.9**i)
    y+=0.9**i

print(g_inv(x/y)-f(N))

0