結果

問題 No.143 豆
ユーザー tt
提出日時 2020-03-10 13:00:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 133 ms / 1,000 ms
コード長 167 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 10,508 KB
実行使用メモリ 29,744 KB
最終ジャッジ日時 2023-09-30 17:46:26
合計ジャッジ時間 4,764 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
29,604 KB
testcase_01 AC 130 ms
29,672 KB
testcase_02 AC 131 ms
29,572 KB
testcase_03 AC 130 ms
29,588 KB
testcase_04 AC 132 ms
29,692 KB
testcase_05 AC 131 ms
29,688 KB
testcase_06 AC 132 ms
29,564 KB
testcase_07 AC 131 ms
29,624 KB
testcase_08 AC 132 ms
29,620 KB
testcase_09 AC 130 ms
29,680 KB
testcase_10 AC 132 ms
29,644 KB
testcase_11 AC 131 ms
29,668 KB
testcase_12 AC 131 ms
29,596 KB
testcase_13 AC 132 ms
29,596 KB
testcase_14 AC 129 ms
29,572 KB
testcase_15 AC 130 ms
29,600 KB
testcase_16 AC 131 ms
29,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

K,N,F = map(int, input().split())
A = [int(F) for F in input().split()]
A_sum = np.sum(A)

if (K*N<A_sum):
    print(-1)
else:
    print(K*N-A_sum)
0