結果
問題 | No.88 次はどっちだ |
ユーザー | yagi2 |
提出日時 | 2017-04-25 12:56:13 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 910 bytes |
コンパイル時間 | 2,008 ms |
コンパイル使用メモリ | 72,612 KB |
実行使用メモリ | 56,552 KB |
最終ジャッジ日時 | 2023-10-11 09:31:05 |
合計ジャッジ時間 | 4,279 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 120 ms
55,596 KB |
testcase_01 | AC | 119 ms
56,356 KB |
testcase_02 | AC | 119 ms
56,160 KB |
testcase_03 | AC | 117 ms
56,184 KB |
testcase_04 | WA | - |
testcase_05 | AC | 119 ms
55,868 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 120 ms
56,364 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
ソースコード
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String first = sc.next(); List<String> ban = new ArrayList<>(); for (int i = 0; i < 8; i++) { ban.add(sc.next()); } int w = 0; int b = 0; for (int i = 0; i < 8; i++) { for (String s : ban.get(i).split("")) { if ("w".equals(s)) w++; if ("b".equals(s)) b++; } } if (w == b) { System.out.println(first); } else if (w > b) { System.out.println(first); } else { if ("oda".equals(first)) { System.out.println("yukiko"); } else { System.out.println("oda"); } } } }