結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー matsuyoshi30matsuyoshi30
提出日時 2017-01-19 23:07:35
言語 Java19
(openjdk 21)
結果
AC  
実行時間 122 ms / 1,000 ms
コード長 688 bytes
コンパイル時間 2,204 ms
コンパイル使用メモリ 72,900 KB
実行使用メモリ 56,036 KB
最終ジャッジ日時 2023-08-11 16:28:57
合計ジャッジ時間 6,973 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
55,512 KB
testcase_01 AC 119 ms
55,540 KB
testcase_02 AC 119 ms
55,684 KB
testcase_03 AC 114 ms
55,500 KB
testcase_04 AC 114 ms
55,676 KB
testcase_05 AC 122 ms
55,584 KB
testcase_06 AC 115 ms
55,972 KB
testcase_07 AC 116 ms
55,324 KB
testcase_08 AC 115 ms
55,556 KB
testcase_09 AC 115 ms
55,664 KB
testcase_10 AC 118 ms
55,644 KB
testcase_11 AC 116 ms
55,552 KB
testcase_12 AC 114 ms
53,352 KB
testcase_13 AC 114 ms
55,560 KB
testcase_14 AC 116 ms
55,316 KB
testcase_15 AC 116 ms
55,540 KB
testcase_16 AC 116 ms
55,424 KB
testcase_17 AC 117 ms
55,560 KB
testcase_18 AC 114 ms
55,536 KB
testcase_19 AC 116 ms
55,528 KB
testcase_20 AC 116 ms
56,036 KB
testcase_21 AC 116 ms
55,784 KB
testcase_22 AC 122 ms
55,224 KB
testcase_23 AC 120 ms
55,364 KB
testcase_24 AC 118 ms
55,828 KB
testcase_25 AC 116 ms
55,712 KB
testcase_26 AC 119 ms
53,880 KB
testcase_27 AC 118 ms
55,480 KB
testcase_28 AC 116 ms
55,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int count = 0;
        int ans = 0;

        for(int i=0; i<2; i++) {
            String s1 = in.next();
            char[] c1 = s1.toCharArray();
            for(int k=0; k<s1.length(); k++) {
                if(c1[k] == 'o') {
                    count++;
                    ans = Math.max(ans, count);
                } else {
                    count = 0;
                }
            }
        }

        System.out.println(ans);

        in.close();
    }
}
0