結果

問題 No.182 新規性の虜
ユーザー rf141
提出日時 2015-08-09 21:52:07
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 477 bytes
コンパイル時間 3,050 ms
コンパイル使用メモリ 75,420 KB
実行使用メモリ 78,408 KB
最終ジャッジ日時 2024-07-18 06:19:56
合計ジャッジ時間 30,344 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 8 WA * 13 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>();
		for(int i = 0; i < n; i++){
			int now = scan.nextInt();
			if(novelty.indexOf(now) == -1){
				novelty.add(now);
			}else{
				continue;
			}
		}
		return novelty.size();
	}
}
0