結果

問題 No.88 次はどっちだ
ユーザー YamaKasaYamaKasa
提出日時 2018-05-11 23:40:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 602 bytes
コンパイル時間 3,624 ms
コンパイル使用メモリ 75,156 KB
実行使用メモリ 56,620 KB
最終ジャッジ日時 2023-09-10 17:53:14
合計ジャッジ時間 5,247 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
56,620 KB
testcase_01 AC 118 ms
56,012 KB
testcase_02 AC 118 ms
55,788 KB
testcase_03 AC 117 ms
56,068 KB
testcase_04 AC 118 ms
56,152 KB
testcase_05 AC 124 ms
56,124 KB
testcase_06 AC 118 ms
55,884 KB
testcase_07 AC 118 ms
55,996 KB
testcase_08 AC 117 ms
55,788 KB
testcase_09 AC 117 ms
56,208 KB
testcase_10 AC 115 ms
55,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Exec0088 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		String []B = new String[8];
		for(int i = 0; i < 8; i++) {
			B[i] = scan.next();
		}
		scan.close();
		int cnt = 0;
		for(int i = 0; i < 8; i++) {
			for(int j = 0; j < 8; j++) {
				char c = B[i].charAt(j);
				if(c == 'w' || c == 'b') {
					cnt ++;
				}
			}
		}

		if(cnt % 2 == 0) {
			System.out.println(S);
		}else {
			if(S.equals("oda")) {
				System.out.println("yukiko");
			}else {
				System.out.println("oda");
			}
		}
	}
}
0