結果

問題 No.99 ジャンピング駒
ユーザー fal_rndfal_rnd
提出日時 2018-04-18 08:56:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 550 ms / 5,000 ms
コード長 381 bytes
コンパイル時間 3,679 ms
コンパイル使用メモリ 73,972 KB
実行使用メモリ 61,652 KB
最終ジャッジ日時 2023-09-09 11:19:32
合計ジャッジ時間 7,335 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 529 ms
61,120 KB
testcase_01 AC 536 ms
61,464 KB
testcase_02 AC 505 ms
61,304 KB
testcase_03 AC 550 ms
61,652 KB
testcase_04 AC 550 ms
61,340 KB
testcase_05 AC 501 ms
61,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.stream.*;
class Main {
    static Scanner s=new Scanner(System.in);
    static int gInt(){return Integer.parseInt(s.next());}
    public static void main(String[]$){
        int n=gInt();
        int[]a={0,0};
        IntStream.range(0,n).map(i->gInt()+1000000000).forEach(o->++a[o%2]);
        System.out.println(Math.abs(a[0]-a[1]));
    }
}
0