結果

問題 No.3009 異なる数字の最大の範囲(勉強会用)
ユーザー kuramubonnkuramubonn
提出日時 2023-02-03 20:12:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 428 bytes
コンパイル時間 3,174 ms
コンパイル使用メモリ 71,332 KB
実行使用メモリ 66,196 KB
最終ジャッジ日時 2023-09-15 15:31:50
合計ジャッジ時間 10,851 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
59,948 KB
testcase_01 WA -
testcase_02 AC 133 ms
60,236 KB
testcase_03 AC 132 ms
60,224 KB
testcase_04 AC 131 ms
60,116 KB
testcase_05 WA -
testcase_06 AC 127 ms
59,620 KB
testcase_07 AC 131 ms
59,808 KB
testcase_08 AC 131 ms
60,172 KB
testcase_09 AC 131 ms
60,064 KB
testcase_10 AC 132 ms
59,856 KB
testcase_11 AC 129 ms
60,396 KB
testcase_12 AC 129 ms
57,776 KB
testcase_13 WA -
testcase_14 AC 130 ms
60,120 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 550 ms
64,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Boolean [] flug = new Boolean [1000001];
		
		int num = sc.nextInt();int count = 0;
		
		for(int i = 0; i < flug.length ; i++) flug[i] = false;
		
		for(int i = 0; i < num ; i++) {
			int t = sc.nextInt();
			if(flug[t] == false) {
				flug[t] = true;
				count++;
			}
		}
		System.out.println(count);
	}
}
0