結果

問題 No.88 次はどっちだ
ユーザー kano_townkano_town
提出日時 2014-12-07 19:04:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 591 bytes
コンパイル時間 3,697 ms
コンパイル使用メモリ 72,544 KB
実行使用メモリ 56,084 KB
最終ジャッジ日時 2023-09-02 09:16:57
合計ジャッジ時間 5,794 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,852 KB
testcase_01 AC 117 ms
56,084 KB
testcase_02 AC 116 ms
55,568 KB
testcase_03 AC 120 ms
55,716 KB
testcase_04 AC 119 ms
55,972 KB
testcase_05 AC 119 ms
55,744 KB
testcase_06 AC 119 ms
55,916 KB
testcase_07 AC 119 ms
56,084 KB
testcase_08 AC 120 ms
55,880 KB
testcase_09 AC 120 ms
55,924 KB
testcase_10 AC 118 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("yukiko");
		} else {
			if (count % 2 == 0)
				System.out.println("yukiko");
			else
				System.out.println("oda");
		}

	}
}
0