結果

問題 No.1692 Expectations
ユーザー ks2mks2m
提出日時 2021-10-01 21:23:10
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 480 bytes
コンパイル時間 4,840 ms
コンパイル使用メモリ 76,680 KB
実行使用メモリ 80,448 KB
最終ジャッジ日時 2023-09-26 16:17:45
合計ジャッジ時間 15,048 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 155 ms
56,832 KB
testcase_01 AC 155 ms
56,732 KB
testcase_02 AC 197 ms
56,288 KB
testcase_03 AC 213 ms
56,764 KB
testcase_04 AC 180 ms
55,140 KB
testcase_05 AC 209 ms
57,084 KB
testcase_06 AC 214 ms
56,516 KB
testcase_07 AC 158 ms
56,984 KB
testcase_08 AC 215 ms
56,732 KB
testcase_09 AC 170 ms
56,736 KB
testcase_10 AC 726 ms
65,536 KB
testcase_11 AC 706 ms
65,128 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 351 ms
60,892 KB
testcase_15 AC 875 ms
71,268 KB
testcase_16 AC 362 ms
60,876 KB
testcase_17 AC 605 ms
65,000 KB
testcase_18 AC 424 ms
61,264 KB
testcase_19 AC 992 ms
71,344 KB
testcase_20 AC 763 ms
75,876 KB
testcase_21 AC 829 ms
80,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for (int i = 0; i < n; i++) {
			set.add(sc.nextInt());
		}
		sc.close();

		int max = set.size();
		int min = 0;
		if (set.size() == 1) {
			min = 1;
		}
		System.out.println(max + " " + min);
	}
}
0