結果

問題 No.99 ジャンピング駒
ユーザー Mcpu3Mcpu3
提出日時 2018-06-28 19:07:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 611 ms / 5,000 ms
コード長 286 bytes
コンパイル時間 2,003 ms
コンパイル使用メモリ 71,500 KB
実行使用メモリ 60,740 KB
最終ジャッジ日時 2023-09-13 14:52:19
合計ジャッジ時間 6,771 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 593 ms
60,580 KB
testcase_01 AC 611 ms
60,464 KB
testcase_02 AC 588 ms
60,408 KB
testcase_03 AC 565 ms
60,740 KB
testcase_04 AC 567 ms
60,688 KB
testcase_05 AC 574 ms
60,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no99{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int n=stdIn.nextInt(),o=0,e=0,t,i;
		for(i=0;i<n;i++) {
			t=stdIn.nextInt();
			if(t%2==0)e++;
			else o++;
		}
		System.out.print(o>e?o-e:e-o);
	}
}
0