結果

問題 No.88 次はどっちだ
ユーザー tentententen
提出日時 2020-11-04 15:26:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 114 ms / 5,000 ms
コード長 630 bytes
コンパイル時間 1,967 ms
コンパイル使用メモリ 72,132 KB
実行使用メモリ 56,112 KB
最終ジャッジ日時 2023-09-29 15:48:31
合計ジャッジ時間 4,136 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
55,864 KB
testcase_01 AC 112 ms
55,776 KB
testcase_02 AC 114 ms
55,424 KB
testcase_03 AC 107 ms
55,652 KB
testcase_04 AC 106 ms
55,888 KB
testcase_05 AC 100 ms
55,440 KB
testcase_06 AC 98 ms
55,752 KB
testcase_07 AC 105 ms
55,924 KB
testcase_08 AC 101 ms
55,832 KB
testcase_09 AC 100 ms
56,112 KB
testcase_10 AC 97 ms
55,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String sente = sc.next();
		int count = 0;
		for (int i = 0; i < 8; i++) {
		    for (char c : sc.next().toCharArray()) {
		        if (c == '.') {
		            count++;
		        }
		    }
		}
		if (count % 2 == 0) {
		    if (sente.equals("oda")) {
		        System.out.println("oda");
		    } else {
		        System.out.println("yukiko");
		    }
		} else {
		    if (sente.equals("oda")) {
		        System.out.println("yukiko");
		    } else {
		        System.out.println("oda");
		    }
		}
	}
}
0