結果

問題 No.143 豆
ユーザー TeraokaAkihiroTeraokaAkihiro
提出日時 2017-01-30 15:37:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 22 ms / 1,000 ms
コード長 179 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 8,744 KB
最終ジャッジ日時 2023-09-30 16:55:39
合計ジャッジ時間 1,242 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
8,596 KB
testcase_01 AC 22 ms
8,516 KB
testcase_02 AC 22 ms
8,536 KB
testcase_03 AC 20 ms
8,612 KB
testcase_04 AC 20 ms
8,632 KB
testcase_05 AC 20 ms
8,648 KB
testcase_06 AC 21 ms
8,588 KB
testcase_07 AC 20 ms
8,516 KB
testcase_08 AC 20 ms
8,624 KB
testcase_09 AC 21 ms
8,536 KB
testcase_10 AC 20 ms
8,744 KB
testcase_11 AC 20 ms
8,604 KB
testcase_12 AC 20 ms
8,672 KB
testcase_13 AC 20 ms
8,684 KB
testcase_14 AC 21 ms
8,596 KB
testcase_15 AC 20 ms
8,576 KB
testcase_16 AC 20 ms
8,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import functools

k,n,f = map(int,input().split())
a = map(int,input().split())

total = functools.reduce(lambda x,y:x+y,a)

if total > k*n:
  print(-1)
else:
  print(k*n - total)
0