結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー mobius_bkstmobius_bkst
提出日時 2015-05-08 22:25:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 60 ms / 1,000 ms
コード長 861 bytes
コンパイル時間 3,365 ms
コンパイル使用メモリ 80,120 KB
実行使用メモリ 37,444 KB
最終ジャッジ日時 2024-11-18 08:57:44
合計ジャッジ時間 5,989 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
37,280 KB
testcase_01 AC 57 ms
37,244 KB
testcase_02 AC 57 ms
37,348 KB
testcase_03 AC 57 ms
37,316 KB
testcase_04 AC 58 ms
37,224 KB
testcase_05 AC 57 ms
37,124 KB
testcase_06 AC 58 ms
37,316 KB
testcase_07 AC 57 ms
37,312 KB
testcase_08 AC 58 ms
37,024 KB
testcase_09 AC 58 ms
37,136 KB
testcase_10 AC 57 ms
37,444 KB
testcase_11 AC 58 ms
37,320 KB
testcase_12 AC 58 ms
37,316 KB
testcase_13 AC 58 ms
37,284 KB
testcase_14 AC 57 ms
37,116 KB
testcase_15 AC 57 ms
37,160 KB
testcase_16 AC 58 ms
36,908 KB
testcase_17 AC 59 ms
37,296 KB
testcase_18 AC 58 ms
37,136 KB
testcase_19 AC 60 ms
36,796 KB
testcase_20 AC 59 ms
36,924 KB
testcase_21 AC 59 ms
37,100 KB
testcase_22 AC 58 ms
37,300 KB
testcase_23 AC 57 ms
37,084 KB
testcase_24 AC 58 ms
37,032 KB
testcase_25 AC 58 ms
36,764 KB
testcase_26 AC 58 ms
37,240 KB
testcase_27 AC 59 ms
37,100 KB
testcase_28 AC 59 ms
37,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;



public class NO203 {
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(
                    System.in));
            String S = br.readLine();
            S += br.readLine();
            int sLen = S.length();
            int count = 0;
            int max = 0;
            for (int i = 0; i < sLen; i++) {
                if(S.substring(i, i+1).equals("o")){
                    count++;
                }else{
                    max = Math.max(max, count);
                    count = 0;
                }

            }
            max = Math.max(max, count);
            System.out.println(max);
        } catch (Exception e) {
            System.err.println("Error:" + e.getMessage());
        }
    }

}
0