結果

問題 No.143 豆
ユーザー matsukin1111
提出日時 2018-12-05 15:45:48
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 1,000 ms
コード長 254 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-23 11:06:26
合計ジャッジ時間 1,319 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

first = input().split()
second = input().split()

f_int = [int(s) for s in first]
s_int = [int(s) for s in second]

total_beans = f_int[0] * f_int[1]
total_age = sum(s_int)

if(total_beans - total_age >= 0):print(total_beans - total_age)
else:print (-1)
0