結果
| 問題 | No.182 新規性の虜 |
| コンテスト | |
| ユーザー |
kohaku_kohaku
|
| 提出日時 | 2016-11-13 05:11:00 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 488 bytes |
| 記録 | |
| コンパイル時間 | 2,139 ms |
| コンパイル使用メモリ | 75,392 KB |
| 実行使用メモリ | 60,200 KB |
| 最終ジャッジ日時 | 2024-11-25 21:45:27 |
| 合計ジャッジ時間 | 12,834 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 7 WA * 20 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int [] A = new int [N+2];
for(int i=1; i<=N; i++){
A[i] = sc.nextInt();
}
Arrays.sort(A);
int count = 0;
for(int i=1; i<=N; i++){
if(A[i]!=A[i-1] && A[i]!=A[i+1]){
count++;
}
}
System.out.println(count);
}
}
kohaku_kohaku