結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-03-05 15:08:36 |
| 言語 | Fortran (gFortran 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 1,000 ms |
| コード長 | 279 bytes |
| 記録 | |
| コンパイル時間 | 655 ms |
| コンパイル使用メモリ | 40,324 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-05 15:08:51 |
| 合計ジャッジ時間 | 1,771 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
program main
implicit none
integer :: K, N, F, calc
integer, allocatable :: A(:)
read *, K, N, F
allocate(A(F))
read *, A(:)
calc = K * N - sum(A)
if (calc >= 0) then
print *, calc
else
print *, -1
end if
end program main