結果

問題 No.182 新規性の虜
ユーザー r.suzuki
提出日時 2015-12-28 22:38:25
言語 Java
(openjdk 23)
結果
TLE  
実行時間 -
コード長 503 bytes
コンパイル時間 2,951 ms
コンパイル使用メモリ 75,164 KB
実行使用メモリ 64,808 KB
最終ジャッジ日時 2024-09-19 08:00:04
合計ジャッジ時間 11,153 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 TLE * 1 -- * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

public class No_182 {

	public static void main(String[] args) {
		java.util.LinkedList<Integer> list = new java.util.LinkedList<Integer>();
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;

		for (int i = 0; i < n; i++) {
			list.add(sc.nextInt());
		}

		while (!list.isEmpty()) {
			Integer x = list.poll();
			if (!list.contains(x)) {
				count++;
			} else {
				while (list.remove(x)) {}
			}
		}
		System.out.println(count);
		sc.close();

	}

}
0