結果
問題 | No.143 豆 |
ユーザー |
![]() |
提出日時 | 2019-08-14 21:00:42 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 1,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-23 11:17:43 |
合計ジャッジ時間 | 1,323 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 |
ソースコード
S = map(int, input().split()) S = list(S) K = int(S[0]) M = int(S[1]) F = int(S[2]) A = input() A_split = A.split() sum = K * M toshi = 0 for i in range(F): toshi = toshi + int(A_split[i]) if sum >= toshi: ans = sum - toshi else: ans = - 1 print(ans)