結果

問題 No.182 新規性の虜
ユーザー kenkooookenkoooo
提出日時 2015-04-16 23:23:23
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 784 bytes
コンパイル時間 2,063 ms
コンパイル使用メモリ 71,324 KB
実行使用メモリ 52,088 KB
最終ジャッジ日時 2023-09-17 21:01:11
合計ジャッジ時間 4,837 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
48,824 KB
testcase_01 AC 39 ms
48,884 KB
testcase_02 AC 40 ms
46,900 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 AC 40 ms
48,864 KB
testcase_14 AC 41 ms
49,032 KB
testcase_15 AC 40 ms
48,872 KB
testcase_16 AC 41 ms
48,832 KB
testcase_17 AC 42 ms
48,768 KB
testcase_18 AC 88 ms
52,088 KB
testcase_19 AC 83 ms
51,620 KB
testcase_20 AC 82 ms
51,604 KB
testcase_21 AC 84 ms
51,820 KB
testcase_22 AC 84 ms
51,396 KB
testcase_23 AC 40 ms
48,856 KB
testcase_24 RE -
testcase_25 AC 86 ms
51,292 KB
testcase_26 RE -
testcase_27 AC 39 ms
48,736 KB
evil01.txt RE -
evil02.txt RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.IOException;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws Exception {
		int N = nextInt();
		int[] num = new int[10001];
		for (int i = 0; i < N; i++) {
			num[nextInt()]++;
		}
		int ans = 0;
		for (int i = 0; i < num.length; i++) {
			if (num[i] == 1) {
				ans++;
			}
		}
		System.out.println(ans);
	}

	static int nextInt() {
		int c;
		try {
			c = System.in.read();
			while (c != '-' && (c < '0' || c > '9'))
				c = System.in.read();
			if (c == '-')
				return -nextInt();
			int res = 0;
			while (c >= '0' && c <= '9') {
				res = res * 10 + c - '0';
				c = System.in.read();
			}
			return res;
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return -1;
	}
}
0