結果

問題 No.143 豆
ユーザー con
提出日時 2018-11-05 15:39:43
言語 Fortran
(gFortran 14.2.0)
結果
WA  
実行時間 -
コード長 231 bytes
コンパイル時間 508 ms
コンパイル使用メモリ 31,360 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-20 20:11:30
合計ジャッジ時間 847 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

implicit none
integer(8) A,B,f,i,k,m,n
integer(8),allocatable :: x(:)
read(*,*) k,n,f
allocate (x(f))
read(*,*) (x(m),m=1,f)
A=0
do m=1,f
   A=A+x(m)
end do
B=k*n-A
if (B>0) then
    write(*,*) B
else
    write(*,*) "-1"
end if
end
0