結果

問題 No.182 新規性の虜
ユーザー rf141
提出日時 2015-08-09 21:56:57
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 473 bytes
コンパイル時間 4,846 ms
コンパイル使用メモリ 75,004 KB
実行使用メモリ 78,444 KB
最終ジャッジ日時 2024-07-18 06:21:19
合計ジャッジ時間 31,123 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other WA * 21 TLE * 1 -- * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Novelty{
	public static void main(String... args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		System.out.println(counter(n,scan));
	}
	public static int counter(int n, Scanner scan){
		ArrayList<Integer> novelty = new ArrayList<Integer>();
		int count=0;
		for(int i = 0; i < n; i++){
			int now = scan.nextInt();
			novelty.add(now);
			if(novelty.indexOf(now) != -1){
				count++;
			}
		}
		return n-count;
	}
}
0