結果

問題 No.99 ジャンピング駒
ユーザー monburan_0401monburan_0401
提出日時 2018-09-16 04:37:44
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 408 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 28,008 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-25 08:53:55
合計ジャッジ時間 981 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>
int main(void){
    int N;
    int X[100000];
    int odd = 0;
    int even = 0;
    
    scanf("%d",&N);
    for(int i = 0; i < N; i++){
        scanf("%d",&X[i]);
        if(X[i]%2 ==0){
            even++;
        }else{
            odd++;
        }
    }
    
    if(odd > even){
        N -= odd*2;
    }else{
        N -= even*2;
    }
    
    printf("%d\n",N);
    
    return 0;
}
0