結果

問題 No.1134 Deviation Score Ⅱ
ユーザー ssmkzkssmkzk
提出日時 2021-02-25 18:34:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 386 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 18,828 KB
最終ジャッジ日時 2024-04-08 16:30:25
合計ジャッジ時間 2,647 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
9,984 KB
testcase_01 AC 74 ms
16,608 KB
testcase_02 AC 66 ms
14,560 KB
testcase_03 AC 70 ms
15,964 KB
testcase_04 AC 46 ms
12,544 KB
testcase_05 AC 73 ms
16,580 KB
testcase_06 AC 42 ms
11,648 KB
testcase_07 AC 38 ms
11,264 KB
testcase_08 AC 71 ms
15,536 KB
testcase_09 AC 38 ms
11,008 KB
testcase_10 AC 30 ms
10,112 KB
testcase_11 AC 62 ms
14,464 KB
testcase_12 AC 58 ms
14,208 KB
testcase_13 AC 80 ms
17,436 KB
testcase_14 AC 60 ms
14,464 KB
testcase_15 AC 50 ms
13,020 KB
testcase_16 AC 39 ms
11,392 KB
testcase_17 AC 59 ms
14,252 KB
testcase_18 AC 62 ms
14,564 KB
testcase_19 AC 70 ms
15,968 KB
testcase_20 AC 52 ms
13,184 KB
testcase_21 AC 67 ms
16,524 KB
testcase_22 AC 61 ms
13,380 KB
testcase_23 AC 31 ms
9,984 KB
testcase_24 AC 30 ms
9,984 KB
testcase_25 AC 35 ms
10,752 KB
testcase_26 AC 83 ms
18,828 KB
testcase_27 AC 31 ms
9,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
N = int(input())
l = list(map(int, input().split()))
M = int(input())

av = sum(l) / N

# print(av)
def f(x):
    return (x - av)**2

ll = list(map(f, l))

av2 = sum(ll) / N
root = av2 ** 0.5
if root == 0:
    print(50)
    sys.exit()
# print(root)

div = abs(l[M - 1] - av)
st3 = (div*10) / root

if l[M - 1] >= av :
    print(int(50 + st3))
else:
    print(int(50 - st3))

0