結果

問題 No.112 ややこしい鶴亀算
ユーザー fal_rndfal_rnd
提出日時 2018-04-25 09:23:39
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 576 bytes
コンパイル時間 2,936 ms
コンパイル使用メモリ 79,088 KB
実行使用メモリ 59,168 KB
最終ジャッジ日時 2023-09-10 05:23:57
合計ジャッジ時間 8,556 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 158 ms
56,652 KB
testcase_01 AC 161 ms
56,892 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 156 ms
56,948 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 157 ms
57,568 KB
testcase_10 WA -
testcase_11 AC 157 ms
56,884 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 163 ms
57,312 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 164 ms
57,164 KB
testcase_21 WA -
testcase_22 AC 165 ms
57,252 KB
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

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=new int[n];
        for(int i=0;i<n;++i){
            a[i]=gInt();
        }
        int[]kinds=Arrays.stream(a).distinct().sorted().toArray();
        int turu=0,kame=0;
        for(int i:a)
            if(kinds[0]==i)
                ++turu;
            else
                ++kame;
        System.out.println(turu+" "+kame);
    }
}
0