結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
![]() |
提出日時 | 2016-01-15 19:34:06 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 41 ms / 5,000 ms |
コード長 | 231 bytes |
コンパイル時間 | 1,301 ms |
コンパイル使用メモリ | 157,344 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 19:07:48 |
合計ジャッジ時間 | 2,374 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include <bits/stdc++.h> using namespace std; signed main() { int n; cin >> n; int ans = 0; while (n--) { int a; cin >> a; if (a & 1) ans++; else ans--; } cout << abs(ans) << endl; }