結果

問題 No.1134 Deviation Score Ⅱ
ユーザー ohana
提出日時 2023-11-06 11:52:31
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 315 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 227 ms
コンパイル使用メモリ 85,208 KB
実行使用メモリ 86,400 KB
最終ジャッジ日時 2026-03-20 12:54:49
合計ジャッジ時間 4,291 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import math

n = int(input())
A = list(map(int, input().split()))
m = int(input())

ave = sum(A) / n

q1 = [((a - ave) ** 2) for a in A]
if sum(q1) == 0:
    print(50)
    exit()
q2 = math.sqrt(sum(q1) / n)
q3 = abs(A[m - 1] - ave) * 10 / q2
if A[m - 1] > ave:
    print(int(50 + q3))
else:
    print(int(50 - q3))
0