結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
|
提出日時 | 2019-07-29 15:36:12 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 57 ms / 5,000 ms |
コード長 | 277 bytes |
コンパイル時間 | 2,082 ms |
コンパイル使用メモリ | 193,372 KB |
最終ジャッジ日時 | 2025-01-07 09:58:45 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin >> n; int x; int od=0; int ev=0; while (n--) { cin >> x; if (x%2) od++; else ev++; } cout << abs(od-ev) << endl; return 0; }