結果

問題 No.99 ジャンピング駒
ユーザー teramurateramura
提出日時 2016-06-11 15:53:20
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 304 bytes
コンパイル時間 430 ms
コンパイル使用メモリ 59,948 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-04-17 18:46:29
合計ジャッジ時間 1,140 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include<math.h>
using namespace std;

int main()
{
    int N;
    cin>>N;
    int X[N];
    int even=0,odd=0;
    for(int i=0;i<N;i++){
        cin>>X[i];
        if(X[i]%2==0)even++;
        else odd++;
    }

    int a=0;
    a=fabs(even-odd);

    cout<<a<<endl;

    return 0;
}
0