結果
| 問題 | 
                            No.88 次はどっちだ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-03-12 17:46:50 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 123 ms / 5,000 ms | 
| コード長 | 745 bytes | 
| コンパイル時間 | 3,122 ms | 
| コンパイル使用メモリ | 74,744 KB | 
| 実行使用メモリ | 54,200 KB | 
| 最終ジャッジ日時 | 2024-09-25 03:20:49 | 
| 合計ジャッジ時間 | 5,063 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 11 | 
ソースコード
package 練習;
import java.util.Scanner;
public class main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int cnt_w=0,cnt_b=0;
		String str_1=sc.next();
		String str_2;
		if(str_1.equals("oda")){
			str_2="yukiko";
		}else if(str_1.equals("yukiko")){
			str_2="oda";
		}else{
			str_2="";
			System.err.println("Error_at17");
		}
		
		for(int i=0;i<8;i++){
			String Str=sc.next();
			for(int j=0;j<8;j++){
				if(Str.charAt(j)=='w'){
					cnt_w++;
				}else if(Str.charAt(j)=='b'){
					cnt_b++;
				}
			}
			
		}
		if((cnt_w+cnt_b)%2==0){//wが先手。
			System.out.println(str_1);
		}else if((cnt_w+cnt_b)%2==1){
			System.out.println(str_2);
		}else{
			System.out.println("Error_at36");
		}
		
	}
}