結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
![]() |
提出日時 | 2016-06-11 15:53:20 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 45 ms / 5,000 ms |
コード長 | 304 bytes |
コンパイル時間 | 833 ms |
コンパイル使用メモリ | 58,624 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 12:52:46 |
合計ジャッジ時間 | 1,331 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include <iostream> #include<math.h> using namespace std; int main() { int N; cin>>N; int X[N]; int even=0,odd=0; for(int i=0;i<N;i++){ cin>>X[i]; if(X[i]%2==0)even++; else odd++; } int a=0; a=fabs(even-odd); cout<<a<<endl; return 0; }