結果
問題 | No.182 新規性の虜 |
ユーザー | _k_a_n_i_ |
提出日時 | 2015-04-23 18:40:50 |
言語 | Java21 (openjdk 21) |
結果 |
TLE
|
実行時間 | - |
コード長 | 907 bytes |
コンパイル時間 | 2,095 ms |
コンパイル使用メモリ | 71,804 KB |
実行使用メモリ | 68,460 KB |
最終ジャッジ日時 | 2023-09-18 08:39:37 |
合計ジャッジ時間 | 9,976 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 124 ms
55,556 KB |
testcase_01 | AC | 124 ms
55,764 KB |
testcase_02 | AC | 124 ms
55,916 KB |
testcase_03 | AC | 123 ms
55,848 KB |
testcase_04 | AC | 124 ms
56,160 KB |
testcase_05 | AC | 129 ms
55,720 KB |
testcase_06 | AC | 124 ms
55,768 KB |
testcase_07 | AC | 124 ms
55,956 KB |
testcase_08 | TLE | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
evil01.txt | -- | - |
evil02.txt | -- | - |
ソースコード
import java.util.Scanner; public class Main { private final static Main main = new Main(); public static void main(String[] args) { long l = System.currentTimeMillis(); main.solve(); //System.out.println("処理時間:" + (System.currentTimeMillis() - l)); } private void solve() { Scanner sc = new Scanner(System.in); sc.nextLine(); String s = sc.nextLine(); String[] list = s.split(" "); int ans = 0; for(String number : list) { int index = s.indexOf(number); if(index == -1) { continue; } if(index != s.lastIndexOf(number)) { s = s.replace(number, "NULL"); } else { ++ans; } } System.out.println(ans); } }