結果

問題 No.88 次はどっちだ
ユーザー kano_townkano_town
提出日時 2014-12-07 19:03:27
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 587 bytes
コンパイル時間 3,332 ms
コンパイル使用メモリ 73,104 KB
実行使用メモリ 58,060 KB
最終ジャッジ日時 2023-09-02 09:16:02
合計ジャッジ時間 5,224 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
55,768 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 114 ms
55,796 KB
testcase_05 WA -
testcase_06 AC 115 ms
56,120 KB
testcase_07 AC 114 ms
55,916 KB
testcase_08 AC 116 ms
56,108 KB
testcase_09 WA -
testcase_10 AC 117 ms
55,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder88 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String name = sc.next();
		String b;
		int count = 0;
		for (int i = 0; i < 8; i++) {
			b = sc.next();
			for (int j = 0; j < 8; j++) {
				if (b.charAt(j) != '.') count++;
			}
		}
		if (name.equals("oda")) {
			if (count % 2 == 0)
				System.out.println("oda");
			else
				System.out.println("yuki");
		} else {
			if (count % 2 == 0)
				System.out.println("yuki");
			else
				System.out.println("oda");
		}

	}
}
0