結果
| 問題 |
No.143 豆
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-11 11:19:00 |
| 言語 | Fortran (gFortran 14.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 282 bytes |
| コンパイル時間 | 1,455 ms |
| コンパイル使用メモリ | 31,224 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-21 20:11:18 |
| 合計ジャッジ時間 | 2,427 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
program main
implicit none
integer::k,n,f,a(100),x=0 ,i
read(*,*) k,n,f
read(*,*) a(1:f)
do i = 1,f
x = x + a(i)
end do
x = k* n - x
if(x>= 0) then
write(*,*) x
else if(x<0) then
write(*,*) "-1"
end if
stop
end program main