結果

問題 No.88 次はどっちだ
ユーザー takutakutakutaku
提出日時 2020-09-23 11:33:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 918 bytes
コンパイル時間 2,095 ms
コンパイル使用メモリ 71,580 KB
実行使用メモリ 56,180 KB
最終ジャッジ日時 2023-09-10 00:58:18
合計ジャッジ時間 4,880 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,436 KB
testcase_01 AC 123 ms
56,068 KB
testcase_02 AC 123 ms
55,680 KB
testcase_03 AC 123 ms
55,664 KB
testcase_04 AC 123 ms
55,736 KB
testcase_05 AC 123 ms
55,660 KB
testcase_06 AC 123 ms
55,720 KB
testcase_07 AC 123 ms
55,776 KB
testcase_08 AC 122 ms
55,428 KB
testcase_09 AC 122 ms
55,592 KB
testcase_10 AC 123 ms
56,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main(String[] args) {
	    
	    // 標準入力を受け取る
	    Scanner sc = new Scanner(System.in);
        String first = sc.nextLine();
        String[] s = new String[8]; 
        int count = 0;
        
        for(int i = 0; i < 8; i++) {
            
            s[i] = sc.nextLine();
            String[] str = s[i].split("",0);
            
            for(int j = 0; j < 8; j++) {
                if(!(str[j].equals("."))) {
                    count++;
                }
            }
            
        }
        if(count % 2 == 0) {
            
            System.out.println(first);
        
            
        }else {
            
            if(first.equals("oda")) {
                System.out.println("yukiko");
            }else {
                System.out.println("oda");
            }
            
        }
        
    }
}
0