結果
| 問題 |
No.182 新規性の虜
|
| コンテスト | |
| ユーザー |
kenkoooo
|
| 提出日時 | 2015-04-16 23:23:23 |
| 言語 | Java (openjdk 23) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 784 bytes |
| コンパイル時間 | 2,131 ms |
| コンパイル使用メモリ | 74,020 KB |
| 実行使用メモリ | 39,132 KB |
| 最終ジャッジ日時 | 2024-07-04 15:03:20 |
| 合計ジャッジ時間 | 4,820 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 RE * 14 |
ソースコード
import java.io.IOException;
import java.util.Arrays;
public class Main {
public static void main(String[] args) throws Exception {
int N = nextInt();
int[] num = new int[10001];
for (int i = 0; i < N; i++) {
num[nextInt()]++;
}
int ans = 0;
for (int i = 0; i < num.length; i++) {
if (num[i] == 1) {
ans++;
}
}
System.out.println(ans);
}
static int nextInt() {
int c;
try {
c = System.in.read();
while (c != '-' && (c < '0' || c > '9'))
c = System.in.read();
if (c == '-')
return -nextInt();
int res = 0;
while (c >= '0' && c <= '9') {
res = res * 10 + c - '0';
c = System.in.read();
}
return res;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return -1;
}
}
kenkoooo