結果

問題 No.1134 Deviation Score Ⅱ
ユーザー lam6er
提出日時 2025-03-20 20:36:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 584 bytes
コンパイル時間 230 ms
コンパイル使用メモリ 82,492 KB
実行使用メモリ 80,008 KB
最終ジャッジ日時 2025-03-20 20:37:46
合計ジャッジ時間 2,821 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 13 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

N = int(input())
x_list = list(map(int, input().split()))
M = int(input())

sum_x = sum(x_list)
n = N
sum_sq_diff_num = 0

for x in x_list:
    term = x * n - sum_x
    sum_sq_diff_num += term ** 2

if sum_sq_diff_num == 0:
    print(50)
else:
    sigma_squared = sum_sq_diff_num / (n ** 3)
    sigma = math.sqrt(sigma_squared)
    x_m = x_list[M - 1]
    difference_numerator = x_m * n - sum_x
    t = (difference_numerator * 10) / (n * sigma)
    if difference_numerator > 0:
        dev = 50 + t
    else:
        dev = 50 - t
    dev_int = int(dev)
    print(dev_int)
0