結果
問題 | No.553 AlphaCoder Rating |
ユーザー | sue_charo |
提出日時 | 2017-08-12 00:10:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 1,500 ms |
コード長 | 860 bytes |
コンパイル時間 | 122 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-12 22:27:33 |
合計ジャッジ時間 | 1,536 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
# 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()