結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー thorikawa
提出日時 2015-05-08 22:23:48
言語 Java
(openjdk 23)
結果
AC  
実行時間 122 ms / 1,000 ms
コード長 510 bytes
コンパイル時間 1,922 ms
コンパイル使用メモリ 76,132 KB
実行使用メモリ 54,304 KB
最終ジャッジ日時 2024-11-18 08:55:31
合計ジャッジ時間 5,990 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] argv) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        s += scanner.next();
        int count = 0;
        int res = 0;
        for (int i = 0; i < 14; i++) {
            if (s.charAt(i) == 'o') {
                count++;
                res = Math.max(res, count);
            } else {
                count = 0;
            }
        }
        System.out.println(res);
    }
}
0