結果
問題 | No.99 ジャンピング駒 |
ユーザー |
![]() |
提出日時 | 2022-08-17 12:24:40 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 50 ms / 5,000 ms |
コード長 | 243 bytes |
コンパイル時間 | 1,975 ms |
コンパイル使用メモリ | 191,592 KB |
最終ジャッジ日時 | 2025-01-30 23:26:17 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define int long longsigned main(){int N;cin>>N;int a = 0, b = 0;for(int i=0;i<N;i++){int x;cin>>x;if(x%2 == 0) a++;else b++;}cout<<abs(a-b)<<endl;}