結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー mobius_bkstmobius_bkst
提出日時 2015-05-08 22:25:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 55 ms / 1,000 ms
コード長 861 bytes
コンパイル時間 5,943 ms
コンパイル使用メモリ 77,112 KB
実行使用メモリ 49,796 KB
最終ジャッジ日時 2023-08-11 15:30:22
合計ジャッジ時間 7,875 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
49,548 KB
testcase_01 AC 50 ms
49,256 KB
testcase_02 AC 50 ms
49,448 KB
testcase_03 AC 50 ms
49,236 KB
testcase_04 AC 49 ms
49,644 KB
testcase_05 AC 50 ms
49,248 KB
testcase_06 AC 50 ms
49,716 KB
testcase_07 AC 49 ms
49,584 KB
testcase_08 AC 50 ms
49,448 KB
testcase_09 AC 50 ms
49,460 KB
testcase_10 AC 49 ms
49,400 KB
testcase_11 AC 49 ms
49,532 KB
testcase_12 AC 50 ms
49,608 KB
testcase_13 AC 50 ms
49,252 KB
testcase_14 AC 50 ms
49,508 KB
testcase_15 AC 50 ms
49,256 KB
testcase_16 AC 50 ms
49,572 KB
testcase_17 AC 49 ms
49,664 KB
testcase_18 AC 49 ms
49,776 KB
testcase_19 AC 49 ms
49,664 KB
testcase_20 AC 50 ms
49,392 KB
testcase_21 AC 49 ms
49,456 KB
testcase_22 AC 49 ms
49,400 KB
testcase_23 AC 49 ms
49,252 KB
testcase_24 AC 49 ms
49,248 KB
testcase_25 AC 51 ms
49,564 KB
testcase_26 AC 52 ms
49,796 KB
testcase_27 AC 55 ms
49,592 KB
testcase_28 AC 50 ms
49,792 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