結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー matsuyoshi30
提出日時 2017-01-19 23:07:35
言語 Java
(openjdk 23)
結果
AC  
実行時間 138 ms / 1,000 ms
コード長 688 bytes
コンパイル時間 2,430 ms
コンパイル使用メモリ 75,144 KB
実行使用メモリ 54,248 KB
最終ジャッジ日時 2024-11-18 10:03:36
合計ジャッジ時間 7,050 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

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