結果

問題 No.182 新規性の虜
ユーザー matsuyoshi30matsuyoshi30
提出日時 2017-02-27 22:18:08
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 713 bytes
コンパイル時間 3,353 ms
コンパイル使用メモリ 73,216 KB
実行使用メモリ 60,500 KB
最終ジャッジ日時 2023-09-02 13:17:34
合計ジャッジ時間 11,491 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
60,500 KB
testcase_01 AC 122 ms
55,872 KB
testcase_02 AC 122 ms
55,976 KB
testcase_03 AC 127 ms
55,860 KB
testcase_04 AC 128 ms
56,020 KB
testcase_05 AC 126 ms
56,000 KB
testcase_06 AC 124 ms
55,916 KB
testcase_07 AC 126 ms
55,804 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
evil01.txt -- -
evil02.txt -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];

        for(int i=0; i<n; i++) {
            a[i] = in.nextInt();
        }

        int cnt = 0;
        for(int i=0; i<n; i++) {
            boolean flag = true;
            for(int j=0; j<n; j++) {
                if(i != j && a[i] == a[j]) {
                    flag = false;
                    break;
                }
            }
            if(flag) cnt++;
        }

        System.out.println(cnt);

        in.close();
    }
}
0