結果

問題 No.88 次はどっちだ
ユーザー YamaKasa
提出日時 2018-05-11 23:40:54
言語 Java
(openjdk 23)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 602 bytes
コンパイル時間 3,465 ms
コンパイル使用メモリ 74,620 KB
実行使用メモリ 54,256 KB
最終ジャッジ日時 2024-06-28 09:04:08
合計ジャッジ時間 5,755 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

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