結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
![]() |
提出日時 | 2018-07-29 18:24:56 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 44 ms / 5,000 ms |
コード長 | 216 bytes |
コンパイル時間 | 398 ms |
コンパイル使用メモリ | 54,528 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-18 09:24:42 |
合計ジャッジ時間 | 1,275 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include <iostream> using namespace std; int main(){ int n; cin >> n; int a=0,b=0,k; for(int i=0;i<n;++i){ cin >> k; k%2==0?++a:++b; } cout << abs(a-b) << endl; return 0; }