結果

問題 No.182 新規性の虜
ユーザー concon
提出日時 2019-06-17 21:45:26
言語 Fortran
(gFortran 14.2.0)
結果
WA  
実行時間 -
コード長 357 bytes
コンパイル時間 2,048 ms
コンパイル使用メモリ 32,512 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-28 23:20:24
合計ジャッジ時間 2,880 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

implicit none
integer(8) i,N,j,c
integer(8),allocatable :: A(:)
integer(8),allocatable :: B(:)
read(*,*) N
allocate (A(1:N))
allocate (B(1:N))
A=0
B=0
c=0
read(*,*) (A(i),i=1,N)
do i=1,N-1
    if (A(i)==A(i+1)) then
        B(i)=B(i)-1
        B(i+1)=B(i+1)-1
    end if
end do
do i=1,N
    if (B(i)==0) then
        c=c+1
    end if
end do
write(*,*) c
end
0