結果

問題 No.21 平均の差
ユーザー togatogatogatoga
提出日時 2015-04-07 14:46:39
言語 Python2
(2.7.18)
結果
AC  
実行時間 13 ms / 5,000 ms
コード長 143 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 6,708 KB
実行使用メモリ 6,244 KB
最終ジャッジ日時 2023-09-17 15:42:33
合計ジャッジ時間 820 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
6,232 KB
testcase_01 AC 12 ms
6,212 KB
testcase_02 AC 12 ms
6,068 KB
testcase_03 AC 11 ms
6,068 KB
testcase_04 AC 12 ms
6,064 KB
testcase_05 AC 12 ms
6,232 KB
testcase_06 AC 12 ms
6,112 KB
testcase_07 AC 12 ms
6,244 KB
testcase_08 AC 12 ms
6,036 KB
testcase_09 AC 12 ms
6,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools


N = input()
K = input()
a = [0] * N
space = N - K
for i in range(N):
    a[i] = input()
a = sorted(a)
print a[N - 1] - a[0]
0