結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
|
提出日時 | 2016-08-14 13:13:56 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 43 ms / 5,000 ms |
コード長 | 274 bytes |
コンパイル時間 | 391 ms |
コンパイル使用メモリ | 53,624 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 16:42:14 |
合計ジャッジ時間 | 1,238 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include <iostream> auto main() -> int { int N; std::cin >> N; int X; int n_odd = 0; int n_even = 0; for (int i = 0; i < N; ++i) { std::cin >> X; if (X%2 == 0) { n_odd++; } else { n_even++; } } std::cout << std::abs(n_odd - n_even) << std::endl; }