結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー tenten
提出日時 2020-11-11 08:19:40
言語 Java
(openjdk 23)
結果
AC  
実行時間 145 ms / 1,000 ms
コード長 443 bytes
コンパイル時間 3,860 ms
コンパイル使用メモリ 76,592 KB
実行使用メモリ 54,460 KB
最終ジャッジ日時 2024-07-22 18:18:15
合計ジャッジ時間 7,301 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

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