結果

問題 No.88 次はどっちだ
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-12 02:13:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 722 bytes
コンパイル時間 2,401 ms
コンパイル使用メモリ 74,380 KB
実行使用メモリ 41,548 KB
最終ジャッジ日時 2024-05-04 09:01:19
合計ジャッジ時間 4,450 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
40,956 KB
testcase_01 AC 109 ms
41,068 KB
testcase_02 AC 122 ms
41,320 KB
testcase_03 AC 115 ms
41,392 KB
testcase_04 AC 109 ms
40,776 KB
testcase_05 AC 110 ms
41,396 KB
testcase_06 AC 110 ms
41,376 KB
testcase_07 AC 122 ms
41,472 KB
testcase_08 AC 109 ms
41,412 KB
testcase_09 AC 126 ms
41,548 KB
testcase_10 AC 107 ms
41,232 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