結果

問題 No.88 次はどっちだ
ユーザー itezpaceitezpace
提出日時 2016-08-22 16:53:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 109 ms / 5,000 ms
コード長 544 bytes
コンパイル時間 2,077 ms
コンパイル使用メモリ 78,168 KB
実行使用メモリ 41,588 KB
最終ジャッジ日時 2024-04-25 11:16:56
合計ジャッジ時間 3,780 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
40,288 KB
testcase_01 AC 94 ms
39,920 KB
testcase_02 AC 107 ms
41,188 KB
testcase_03 AC 93 ms
39,948 KB
testcase_04 AC 102 ms
41,224 KB
testcase_05 AC 103 ms
40,896 KB
testcase_06 AC 109 ms
41,588 KB
testcase_07 AC 92 ms
40,180 KB
testcase_08 AC 103 ms
40,812 KB
testcase_09 AC 95 ms
40,480 KB
testcase_10 AC 102 ms
40,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Yuki88 {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int x = 0;
    for(int i=0; i<8; ++i){
      String b = sc.next();
      for(int j=0; j<8; ++j){
        char a = b.charAt(j);
        if(a=='w' || a=='b'){
          x+=1;
        }
      }
    }
    if(x%2==0){
      System.out.println(s);
    } else {
      if(s.equals("oda")){
        System.out.println("yukiko");
      } else {
        System.out.println("oda");
      }
    }
  }
}
0