結果
| 問題 |
No.8009 異なる数字の最大の範囲(勉強会用)
|
| ユーザー |
|
| 提出日時 | 2023-02-03 20:12:40 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 428 bytes |
| コンパイル時間 | 2,039 ms |
| コンパイル使用メモリ | 74,724 KB |
| 実行使用メモリ | 63,780 KB |
| 最終ジャッジ日時 | 2024-07-02 18:12:27 |
| 合計ジャッジ時間 | 10,825 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 12 |
ソースコード
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);
}
}