結果
問題 | No.182 新規性の虜 |
ユーザー |
![]() |
提出日時 | 2017-02-27 22:18:08 |
言語 | Java (openjdk 23) |
結果 |
TLE
|
実行時間 | - |
コード長 | 713 bytes |
コンパイル時間 | 1,880 ms |
コンパイル使用メモリ | 74,920 KB |
実行使用メモリ | 76,192 KB |
最終ジャッジ日時 | 2024-06-11 19:56:43 |
合計ジャッジ時間 | 9,784 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 TLE * 1 -- * 21 |
ソースコード
import java.util.Scanner; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] a = new int[n]; for(int i=0; i<n; i++) { a[i] = in.nextInt(); } int cnt = 0; for(int i=0; i<n; i++) { boolean flag = true; for(int j=0; j<n; j++) { if(i != j && a[i] == a[j]) { flag = false; break; } } if(flag) cnt++; } System.out.println(cnt); in.close(); } }