結果

問題 No.99 ジャンピング駒
ユーザー 173205080173205080
提出日時 2019-07-12 09:09:24
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 566 ms
コンパイル使用メモリ 27,816 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-10 16:44:05
合計ジャッジ時間 1,624 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 14 ms
4,376 KB
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define df 0
#define dist(a,b) (a<b?b-a:a-b) 


int main(){
  int n;
  scanf("%d",&n);
  int i,s[2]={};
  for(i=0;i<n;i++){
    long int a;
    scanf("%ld",&a);
    s[a%2]++;
  }
  printf("%d",dist(s[0],s[1]));
  return 0;
}


/// confirm df==0 ///
0