結果

問題 No.99 ジャンピング駒
ユーザー s0j1sans0j1san
提出日時 2018-01-07 22:27:46
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 321 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 26,624 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-24 23:41:28
合計ジャッジ時間 927 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

program main
    implicit none
    integer n,i
    integer,allocatable,dimension(:)::a
    integer ::odd=0,even=0
    read(*,*)n
    allocate(a(n))
    read(*,*)a
    do i=1,n
        if(mod(a(i),2)==0)even=even+1                
        if(mod(a(i),2)/=0)odd=odd+1
    enddo
    write(*,*)abs(even-odd)
end program main
0