結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー tentententen
提出日時 2020-11-11 08:19:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 1,000 ms
コード長 443 bytes
コンパイル時間 4,813 ms
コンパイル使用メモリ 73,564 KB
実行使用メモリ 56,056 KB
最終ジャッジ日時 2023-09-30 00:21:20
合計ジャッジ時間 9,333 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,328 KB
testcase_01 AC 124 ms
53,864 KB
testcase_02 AC 124 ms
55,736 KB
testcase_03 AC 124 ms
55,668 KB
testcase_04 AC 123 ms
55,768 KB
testcase_05 AC 126 ms
55,856 KB
testcase_06 AC 125 ms
53,288 KB
testcase_07 AC 125 ms
55,832 KB
testcase_08 AC 124 ms
55,800 KB
testcase_09 AC 124 ms
55,624 KB
testcase_10 AC 125 ms
55,820 KB
testcase_11 AC 128 ms
55,708 KB
testcase_12 AC 125 ms
55,912 KB
testcase_13 AC 124 ms
55,712 KB
testcase_14 AC 127 ms
55,780 KB
testcase_15 AC 124 ms
55,656 KB
testcase_16 AC 125 ms
56,036 KB
testcase_17 AC 121 ms
55,596 KB
testcase_18 AC 124 ms
55,480 KB
testcase_19 AC 125 ms
55,604 KB
testcase_20 AC 125 ms
55,648 KB
testcase_21 AC 123 ms
56,056 KB
testcase_22 AC 126 ms
55,572 KB
testcase_23 AC 127 ms
55,940 KB
testcase_24 AC 126 ms
55,500 KB
testcase_25 AC 127 ms
55,660 KB
testcase_26 AC 126 ms
55,648 KB
testcase_27 AC 124 ms
55,580 KB
testcase_28 AC 124 ms
55,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int max = 0;
        for (char c : (sc.next() + sc.next()).toCharArray()) {
            if (c == 'o') {
                count++;
            } else {
                count = 0;
            }
            max = Math.max(max, count);
        }
        System.out.println(max);
    }
}
0