結果

問題 No.1134 Deviation Score Ⅱ
ユーザー tomoyaatcodertomoyaatcoder
提出日時 2020-07-30 02:59:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 385 bytes
コンパイル時間 1,160 ms
コンパイル使用メモリ 86,848 KB
実行使用メモリ 90,384 KB
最終ジャッジ日時 2023-09-13 21:09:36
合計ジャッジ時間 4,825 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,452 KB
testcase_01 AC 107 ms
88,096 KB
testcase_02 AC 87 ms
84,212 KB
testcase_03 AC 93 ms
86,716 KB
testcase_04 AC 83 ms
79,272 KB
testcase_05 AC 91 ms
88,148 KB
testcase_06 AC 80 ms
77,904 KB
testcase_07 AC 80 ms
76,792 KB
testcase_08 AC 92 ms
86,828 KB
testcase_09 AC 79 ms
76,352 KB
testcase_10 AC 79 ms
76,420 KB
testcase_11 AC 89 ms
84,052 KB
testcase_12 AC 88 ms
83,104 KB
testcase_13 AC 95 ms
90,020 KB
testcase_14 AC 87 ms
84,108 KB
testcase_15 AC 82 ms
79,868 KB
testcase_16 AC 78 ms
77,196 KB
testcase_17 AC 86 ms
83,280 KB
testcase_18 AC 91 ms
83,968 KB
testcase_19 AC 91 ms
86,964 KB
testcase_20 AC 84 ms
80,852 KB
testcase_21 AC 92 ms
87,000 KB
testcase_22 AC 91 ms
86,492 KB
testcase_23 AC 73 ms
71,452 KB
testcase_24 AC 72 ms
71,276 KB
testcase_25 AC 78 ms
76,380 KB
testcase_26 AC 95 ms
90,384 KB
testcase_27 AC 74 ms
71,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0