結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー cande398cande398
提出日時 2017-10-16 00:48:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 1,000 ms
コード長 553 bytes
コンパイル時間 2,126 ms
コンパイル使用メモリ 73,640 KB
実行使用メモリ 56,312 KB
最終ジャッジ日時 2023-08-11 16:37:51
合計ジャッジ時間 6,991 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,992 KB
testcase_01 AC 120 ms
55,900 KB
testcase_02 AC 121 ms
55,824 KB
testcase_03 AC 120 ms
55,708 KB
testcase_04 AC 121 ms
55,748 KB
testcase_05 AC 118 ms
56,268 KB
testcase_06 AC 120 ms
55,640 KB
testcase_07 AC 120 ms
55,560 KB
testcase_08 AC 120 ms
55,996 KB
testcase_09 AC 120 ms
55,800 KB
testcase_10 AC 120 ms
55,692 KB
testcase_11 AC 120 ms
55,996 KB
testcase_12 AC 118 ms
55,760 KB
testcase_13 AC 119 ms
55,844 KB
testcase_14 AC 122 ms
55,948 KB
testcase_15 AC 120 ms
55,852 KB
testcase_16 AC 123 ms
56,312 KB
testcase_17 AC 125 ms
55,696 KB
testcase_18 AC 124 ms
55,672 KB
testcase_19 AC 120 ms
55,756 KB
testcase_20 AC 120 ms
55,924 KB
testcase_21 AC 118 ms
55,716 KB
testcase_22 AC 117 ms
55,648 KB
testcase_23 AC 126 ms
55,712 KB
testcase_24 AC 120 ms
56,168 KB
testcase_25 AC 123 ms
55,556 KB
testcase_26 AC 119 ms
55,984 KB
testcase_27 AC 118 ms
55,832 KB
testcase_28 AC 119 ms
55,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String input = sc.next() + sc.next();
        int count = 0, max = 0;
        for(int i=0;i<14;i++){
            if(input.charAt(i) == 'o'){
                count = 0;
                for(int j=i;j<14;j++){
                    if(input.charAt(j) != 'o')break;
                    count++;
                }
                max = Math.max(max,count);
            }  
        }
        System.out.println(max);
    }
}
0