結果
問題 | No.88 次はどっちだ |
ユーザー | shin |
提出日時 | 2022-05-17 15:22:40 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 50 ms / 5,000 ms |
コード長 | 869 bytes |
コンパイル時間 | 5,418 ms |
コンパイル使用メモリ | 73,632 KB |
実行使用メモリ | 50,028 KB |
最終ジャッジ日時 | 2023-10-13 13:09:28 |
合計ジャッジ時間 | 5,609 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 48 ms
48,192 KB |
testcase_01 | AC | 49 ms
49,664 KB |
testcase_02 | AC | 48 ms
48,020 KB |
testcase_03 | AC | 49 ms
49,964 KB |
testcase_04 | AC | 48 ms
49,732 KB |
testcase_05 | AC | 50 ms
49,884 KB |
testcase_06 | AC | 49 ms
49,900 KB |
testcase_07 | AC | 48 ms
49,724 KB |
testcase_08 | AC | 48 ms
49,728 KB |
testcase_09 | AC | 48 ms
49,776 KB |
testcase_10 | AC | 49 ms
50,028 KB |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class No88 { public static void main(String[] args) throws IOException{ //次はどっちだ String[] text = readStr(); int count = 0; for(int i = 0;i < 8;i++) { text[i+1] = text[i+1].replaceAll("[a-z]", ""); count += 8 - text[i+1].length(); } if(count % 2 == 0) { System.out.println(text[0]); }else { System.out.println("odayukiko".replaceAll(text[0], "")); } } public static String[] readStr() throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ArrayList<String> list = new ArrayList<>(); do { list.add(br.readLine()); }while(br.ready()); br.close(); String[] text = new String[list.size()]; list.toArray(text); return text; } }