結果

問題 No.88 次はどっちだ
ユーザー koukonkokoukonko
提出日時 2015-12-11 04:49:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 846 bytes
コンパイル時間 4,396 ms
コンパイル使用メモリ 72,056 KB
実行使用メモリ 49,600 KB
最終ジャッジ日時 2023-10-13 10:51:27
合計ジャッジ時間 3,292 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,368 KB
testcase_01 AC 43 ms
49,208 KB
testcase_02 AC 43 ms
49,520 KB
testcase_03 AC 43 ms
49,220 KB
testcase_04 AC 43 ms
49,400 KB
testcase_05 AC 43 ms
49,216 KB
testcase_06 AC 43 ms
49,600 KB
testcase_07 AC 44 ms
49,228 KB
testcase_08 AC 43 ms
49,300 KB
testcase_09 AC 43 ms
49,488 KB
testcase_10 AC 44 ms
49,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
		String[] player = new String[2];
		try {

			if(buff.readLine().equals("oda")){
				player[0] = "oda";
				player[1] = "yukiko";
			}else{
				player[0] = "yukiko";
				player[1] = "oda";
			}

			int count = 0;
			for(int i = 0; i < 8; ++i){
				String line = buff.readLine();
				for(int j = 0; j < 8; ++j){
					if(line.charAt(j) == 'w' || line.charAt(j) == 'b'){
						count++;
					}
				}
			}

			System.out.println(player[count%2]);

		} catch (NumberFormatException e) {
			e.getStackTrace();
		} catch (IOException e) {
			e.getStackTrace();
		} catch (Exception e) {
			e.getStackTrace();
		}
	}
}
0