結果

問題 No.99 ジャンピング駒
ユーザー 古寺いろは
提出日時 2015-04-10 20:19:14
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 218 bytes
コンパイル時間 2,252 ms
コンパイル使用メモリ 158,096 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-04 13:32:50
合計ジャッジ時間 2,021 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;


int main(){
	int N;
	cin >> N;
	int ans = 0;
	for (int i = 0; i < N; i++)
	{
		int X;
		cin >> X;
		if (X % 2 == 0) ans++;
		else ans--;
	}
	cout << abs(ans) << endl;
}

0