結果

問題 No.88 次はどっちだ
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-12 02:13:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 722 bytes
コンパイル時間 2,497 ms
コンパイル使用メモリ 71,748 KB
実行使用メモリ 57,732 KB
最終ジャッジ日時 2023-08-17 01:47:51
合計ジャッジ時間 4,918 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,452 KB
testcase_01 AC 125 ms
55,400 KB
testcase_02 AC 124 ms
55,768 KB
testcase_03 AC 125 ms
57,732 KB
testcase_04 AC 123 ms
55,868 KB
testcase_05 AC 124 ms
55,664 KB
testcase_06 AC 124 ms
55,976 KB
testcase_07 AC 124 ms
56,012 KB
testcase_08 AC 124 ms
55,756 KB
testcase_09 AC 123 ms
55,400 KB
testcase_10 AC 124 ms
55,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        for(int i=0; i<8; i++){
            String t = sc.next();
            String [] arr = t.split("");
            for(int j=0; j<arr.length; j++){
                if( "w".equals(arr[j]) || "b".equals(arr[j]) ){
                    count++;
                }
            }
        }
        if(count%2==0){
            System.out.println(s);
        }else{
            if( "yukiko".equals(s) ){
                System.out.println("oda");
            }else{
                System.out.println("yukiko");
            }
        }
    }
}
0