結果

問題 No.1183 コイン遊び
ユーザー jj1guj
提出日時 2020-08-22 13:07:43
言語 Fortran
(gFortran 14.2.0)
結果
AC  
実行時間 250 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 2,253 ms
コンパイル使用メモリ 31,872 KB
実行使用メモリ 18,552 KB
最終ジャッジ日時 2024-10-15 07:14:39
合計ジャッジ時間 9,636 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

program main
    implicit none
    integer(8)::N,flg,i,ans=0
    integer(8),allocatable::A(:),B(:)
    read*,N
    allocate(A(N))
    allocate(B(N))
    read*,A,B

    flg=0
    do i=1,N
        if(A(i)/=B(i))then
            if(flg==0)then
                flg=1
                ans=ans+1
            end if
        else
            flg=0
        end if
    end do

    print'(i0)',ans
end program main
0