結果

問題 No.99 ジャンピング駒
ユーザー eri
提出日時 2015-07-09 02:02:58
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 42 ms / 5,000 ms
コード長 206 bytes
コンパイル時間 325 ms
コンパイル使用メモリ 55,468 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-08 01:46:05
合計ジャッジ時間 1,098 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
int main(void){
	int N; cin >> N;
	int ans = 0;
	for (int i = 0; i < N; i++){
		int X; cin >> X;
		(X % 2) ? ans-- : ans++;
	}
	cout << abs(ans) << endl;
	return 0;
}
0