結果
問題 | No.182 新規性の虜 |
ユーザー | rf141 |
提出日時 | 2015-08-09 21:52:07 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 477 bytes |
コンパイル時間 | 3,241 ms |
コンパイル使用メモリ | 72,544 KB |
実行使用メモリ | 71,900 KB |
最終ジャッジ日時 | 2023-09-25 07:41:03 |
合計ジャッジ時間 | 32,688 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | AC | 121 ms
56,016 KB |
testcase_03 | AC | 123 ms
56,008 KB |
testcase_04 | AC | 124 ms
55,836 KB |
testcase_05 | AC | 125 ms
55,724 KB |
testcase_06 | AC | 122 ms
55,948 KB |
testcase_07 | AC | 125 ms
55,752 KB |
testcase_08 | AC | 2,159 ms
65,360 KB |
testcase_09 | TLE | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 123 ms
55,996 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | AC | 128 ms
55,908 KB |
testcase_24 | TLE | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
evil01.txt | -- | - |
evil02.txt | -- | - |
ソースコード
import java.util.*; public class Novelty{ public static void main(String... args){ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); System.out.println(counter(n,scan)); } public static int counter(int n, Scanner scan){ ArrayList<Integer> novelty = new ArrayList<Integer>(); for(int i = 0; i < n; i++){ int now = scan.nextInt(); if(novelty.indexOf(now) == -1){ novelty.add(now); }else{ continue; } } return novelty.size(); } }