結果

問題 No.88 次はどっちだ
ユーザー htensaihtensai
提出日時 2019-12-19 13:17:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 775 bytes
コンパイル時間 2,065 ms
コンパイル使用メモリ 72,148 KB
実行使用メモリ 49,724 KB
最終ジャッジ日時 2023-09-21 06:43:25
合計ジャッジ時間 3,247 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,164 KB
testcase_01 AC 42 ms
49,360 KB
testcase_02 AC 42 ms
49,724 KB
testcase_03 AC 43 ms
49,272 KB
testcase_04 AC 43 ms
49,184 KB
testcase_05 AC 43 ms
49,368 KB
testcase_06 AC 45 ms
49,436 KB
testcase_07 AC 44 ms
49,148 KB
testcase_08 AC 43 ms
49,404 KB
testcase_09 AC 43 ms
49,668 KB
testcase_10 AC 42 ms
49,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String name1 = br.readLine();
        String name2;
        if (name1.equals("oda")) {
            name2 = "yukiko";
        } else {
            name2 = "oda";
        }
        int count = 0;
        for (int i = 0; i < 8; i++) {
            char[] arr = br.readLine().toCharArray();
            for (char c : arr) {
                if (c != '.') {
                    count++;
                }
            }
        }
        if (count % 2 == 0) {
            System.out.println(name1);
        } else {
            System.out.println(name2);
        }
    }
}
0