結果
問題 | No.88 次はどっちだ |
ユーザー |
![]() |
提出日時 | 2015-12-11 04:49:02 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 54 ms / 5,000 ms |
コード長 | 846 bytes |
コンパイル時間 | 2,457 ms |
コンパイル使用メモリ | 74,860 KB |
実行使用メモリ | 50,180 KB |
最終ジャッジ日時 | 2024-09-15 07:53:47 |
合計ジャッジ時間 | 4,204 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
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(); } } }