結果
問題 | No.88 次はどっちだ |
ユーザー | Pump0129 |
提出日時 | 2018-03-28 00:58:53 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 121 ms / 5,000 ms |
コード長 | 671 bytes |
コンパイル時間 | 2,321 ms |
コンパイル使用メモリ | 77,320 KB |
実行使用メモリ | 56,816 KB |
最終ジャッジ日時 | 2023-09-07 19:16:18 |
合計ジャッジ時間 | 4,467 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 117 ms
55,708 KB |
testcase_01 | AC | 120 ms
55,788 KB |
testcase_02 | AC | 121 ms
56,608 KB |
testcase_03 | AC | 117 ms
56,056 KB |
testcase_04 | AC | 117 ms
56,020 KB |
testcase_05 | AC | 119 ms
56,080 KB |
testcase_06 | AC | 116 ms
55,936 KB |
testcase_07 | AC | 117 ms
55,556 KB |
testcase_08 | AC | 117 ms
56,032 KB |
testcase_09 | AC | 118 ms
56,552 KB |
testcase_10 | AC | 116 ms
56,816 KB |
ソースコード
package net.ipipip0129.yukicoder.no88; import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); boolean isStarterOda = scan.nextLine().equalsIgnoreCase("oda"); int cnt = 0; for (int i = 0; i < 8; i++) { String line = scan.nextLine(); cnt += Arrays.stream(line.split("")) .filter(s -> s.matches("[wb]")) .toArray().length; } System.out.println(cnt % 2 == 0 ? isStarterOda ? "oda" : "yukiko" : isStarterOda ? "yukiko" : "oda"); } }