結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー MoominPazMoominPaz
提出日時 2015-10-07 21:28:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 53 ms / 1,000 ms
コード長 967 bytes
コンパイル時間 2,460 ms
コンパイル使用メモリ 74,000 KB
実行使用メモリ 37,044 KB
最終ジャッジ日時 2024-04-29 07:56:11
合計ジャッジ時間 4,904 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
36,916 KB
testcase_01 AC 50 ms
36,868 KB
testcase_02 AC 51 ms
36,864 KB
testcase_03 AC 52 ms
36,524 KB
testcase_04 AC 50 ms
36,888 KB
testcase_05 AC 52 ms
36,904 KB
testcase_06 AC 51 ms
36,812 KB
testcase_07 AC 50 ms
36,600 KB
testcase_08 AC 49 ms
36,780 KB
testcase_09 AC 50 ms
36,872 KB
testcase_10 AC 50 ms
36,920 KB
testcase_11 AC 53 ms
36,652 KB
testcase_12 AC 51 ms
37,044 KB
testcase_13 AC 53 ms
36,660 KB
testcase_14 AC 51 ms
36,872 KB
testcase_15 AC 51 ms
36,892 KB
testcase_16 AC 52 ms
36,620 KB
testcase_17 AC 52 ms
36,640 KB
testcase_18 AC 53 ms
36,624 KB
testcase_19 AC 51 ms
36,656 KB
testcase_20 AC 50 ms
36,932 KB
testcase_21 AC 52 ms
36,428 KB
testcase_22 AC 51 ms
36,788 KB
testcase_23 AC 51 ms
36,884 KB
testcase_24 AC 51 ms
36,452 KB
testcase_25 AC 51 ms
36,804 KB
testcase_26 AC 50 ms
36,504 KB
testcase_27 AC 50 ms
36,652 KB
testcase_28 AC 51 ms
36,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder InputChar = new StringBuilder();
    int Result = 0;
    public static void main(String[] args) throws IOException {
        new Main().solve();
    }

    void solve() throws IOException {
        for(int i = 0; i < 2; i++) {
            InputChar.append(br.readLine());
        }
        Result = CountUp(InputChar);
        System.out.println(Result);
    }

    int CountUp(StringBuilder WorkInputChar) {
        int WorkResult = 0;
        int Count = 0;
        for(int i = 0; i < WorkInputChar.length(); i++) {
            if(WorkInputChar.charAt(i) == 'o') {
                Count++;
                WorkResult = Math.max(WorkResult, Count);
            } else {
                Count = 0;
            }
        }
        return WorkResult;
    }
}
0