結果

問題 No.1134 Deviation Score Ⅱ
ユーザー lam6er
提出日時 2025-04-16 16:34:57
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 492 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 222 ms
コンパイル使用メモリ 95,724 KB
実行使用メモリ 96,908 KB
最終ジャッジ日時 2026-07-09 15:59:25
合計ジャッジ時間 4,331 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 13 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import math

n = int(input())
x = list(map(int, input().split()))
m = int(input()) - 1  # Convert to 0-based index

x_m = x[m]
sum_x = sum(x)
mean = sum_x / n

sum_squares = 0.0
for xi in x:
    diff = xi - mean
    sum_squares += diff * diff

variance = sum_squares / n
std_dev = math.sqrt(variance)

if std_dev == 0:
    print(50)
else:
    temp = 10 * (x_m - mean) / std_dev
    if x_m > mean:
        ans_float = 50 + temp
    else:
        ans_float = 50 - temp
    print(int(ans_float))
0