結果

問題 No.1134 Deviation Score Ⅱ
ユーザー 双六双六
提出日時 2020-08-19 01:43:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 622 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 82,144 KB
実行使用メモリ 81,668 KB
最終ジャッジ日時 2024-04-20 08:06:11
合計ジャッジ時間 2,337 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
54,244 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 43 ms
68,968 KB
testcase_05 WA -
testcase_06 AC 43 ms
66,496 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 41 ms
64,932 KB
testcase_10 AC 41 ms
61,476 KB
testcase_11 AC 49 ms
73,388 KB
testcase_12 WA -
testcase_13 AC 58 ms
80,280 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 42 ms
64,848 KB
testcase_17 AC 49 ms
73,556 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 52 ms
76,248 KB
testcase_22 AC 51 ms
75,596 KB
testcase_23 AC 36 ms
55,568 KB
testcase_24 AC 36 ms
54,920 KB
testcase_25 AC 41 ms
63,832 KB
testcase_26 AC 55 ms
81,668 KB
testcase_27 AC 36 ms
54,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	X = getlist()
	M = int(input())
	ave = sum(X) / N
	s2 = 0
	for i in range(N):
		s2 += (X[i] - ave) ** 2

	if s2 == 0:
		print(50)
		return
	s = (s2 / N) ** 0.5
	# print(ave, s2, s)



	if X[M - 1] >= ave:
		dif = int((X[M - 1] - ave) * 10 // s)
		print(50 + dif)
	else:
		dif = int((ave - X[M - 1]) * 10 // s)
		print(50 - dif)





if __name__ == '__main__':
	main()
0