結果
| 問題 |
No.88 次はどっちだ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-17 15:22:40 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 5,000 ms |
| コード長 | 869 bytes |
| コンパイル時間 | 3,473 ms |
| コンパイル使用メモリ | 77,000 KB |
| 実行使用メモリ | 37,272 KB |
| 最終ジャッジ日時 | 2024-09-15 09:59:18 |
| 合計ジャッジ時間 | 4,752 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
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;
}
}