結果
| 問題 |
No.1134 Deviation Score Ⅱ
|
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 15:46:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 415 bytes |
| コンパイル時間 | 253 ms |
| コンパイル使用メモリ | 82,972 KB |
| 実行使用メモリ | 83,064 KB |
| 最終ジャッジ日時 | 2025-06-12 15:46:10 |
| 合計ジャッジ時間 | 2,981 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 13 WA * 14 |
ソースコード
import math
n = int(input())
x = list(map(int, input().split()))
m = int(input()) - 1 # convert to 0-based index
x_m = x[m]
mu = sum(x) / n
sum_sq = 0.0
for xi in x:
sum_sq += (xi - mu) ** 2
variance = sum_sq / n
sigma = math.sqrt(variance)
if sigma == 0:
print(50)
else:
temp = (x_m - mu) * 10 / sigma
if x_m > mu:
dev = 50 + temp
else:
dev = 50 - temp
print(int(dev))
gew1fw