結果

問題 No.586 ダブルブッキング
ユーザー BQZetBQZet
提出日時 2017-11-23 00:22:24
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 286 bytes
コンパイル時間 610 ms
コンパイル使用メモリ 26,824 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-17 14:35:00
合計ジャッジ時間 1,472 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

program DoubleBooking

integer,allocatable,dimension(:)::R
integer::P1,P2,N,k,sum,X

sum=0

read(*,*)P1,P2
read(*,*)N
allocate(R(N))
read(*,*)R(:)

do X=1,999
 if(count(X==R(:))<2) cycle
 sum=sum+count(X==R(:))-1
end do

write(*,*)sum*(P1+P2)
end program DoubleBooking
0