結果

問題 No.88 次はどっちだ
ユーザー abc
提出日時 2016-11-02 13:42:13
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 701 bytes
コンパイル時間 2,237 ms
コンパイル使用メモリ 75,452 KB
実行使用メモリ 54,268 KB
最終ジャッジ日時 2024-11-25 01:27:04
合計ジャッジ時間 4,266 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        String blackPlayer = sc.next();
        int discsCount = 0;

        for (int i = 0; i < 8; i++) {

            String row = sc.next();

            for (int j = 0; j < 8; j++) {

                if (row.charAt(j) != '.') {
                    discsCount++;
                }

            }

        }

        if ((blackPlayer.equals("oda")) && (discsCount % 2 == 0)) {
            System.out.println("oda");
        }

        if ((blackPlayer.equals("yukiko")) && (discsCount % 2 == 0)) {
            System.out.println("yukiko");
        }

    }

}
0