結果

問題 No.99 ジャンピング駒
ユーザー リチウム
提出日時 2014-12-10 01:25:59
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 281 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 55,552 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-11 19:10:59
合計ジャッジ時間 1,207 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

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


int main()
{
	int n; cin >> n;
	int gu = 0;
	int ki = 0;
	for (int i = 0; i < n; i++)
	{
		int x;
		cin >> x;
		if (abs(x) % 2 == 0)gu++;
		else ki++;
	}
	cout << abs(ki - gu) << endl;
	
	return 0;
}
0