結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
53,888 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 59 ms
76,288 KB
testcase_22 AC 59 ms
75,136 KB
testcase_23 AC 42 ms
53,760 KB
testcase_24 AC 41 ms
53,888 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 40 ms
54,272 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 / 10) ** 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