結果
問題 |
No.1134 Deviation Score Ⅱ
|
ユーザー |
|
提出日時 | 2020-07-30 02:59:31 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 68 ms / 2,000 ms |
コード長 | 385 bytes |
コンパイル時間 | 551 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 83,456 KB |
最終ジャッジ日時 | 2024-07-01 05:37:55 |
合計ジャッジ時間 | 2,544 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 27 |
ソースコード
from math import sqrt n = int(input()) x = list(map(int, input().split())) m = int(input()) - 1 average = sum(x) / n a = [abs(i - average) ** 2 for i in x] b = sqrt(sum(a) / n) if b == 0: print(50) exit(0) c = abs(average - x[m]) * 10 / b if x[m] > average: print(int(50 + c)) else: print(int(50 - c)) # print("average =", average) # print("b =", b) # print("c =", c)