結果
問題 |
No.1134 Deviation Score Ⅱ
|
ユーザー |
![]() |
提出日時 | 2025-06-12 20:42:59 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 529 bytes |
コンパイル時間 | 199 ms |
コンパイル使用メモリ | 82,024 KB |
実行使用メモリ | 84,544 KB |
最終ジャッジ日時 | 2025-06-12 20:43:10 |
合計ジャッジ時間 | 2,955 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 sum_x = sum(x) sum_x_sq = sum(a * a for a in x) avg = sum_x / n numerator = sum_x_sq - (sum_x ** 2) / n variance = numerator / n if abs(variance) < 1e-9: std_dev = 0.0 else: std_dev = math.sqrt(variance) x_m = x[m] if std_dev == 0: print(50) else: diff = x_m - avg temp = (diff * 10) / std_dev if x_m > avg: dev = 50 + temp else: dev = 50 - temp print(int(dev))