結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー yagi2
提出日時 2017-04-21 16:39:30
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 496 bytes
コンパイル時間 2,173 ms
コンパイル使用メモリ 76,256 KB
実行使用メモリ 54,588 KB
最終ジャッジ日時 2024-07-20 05:07:12
合計ジャッジ時間 6,707 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

        int num = 0;
        int tmp = 0;
        for (String s : W.split("")) {
            if (s.equals("o")) {
                tmp++;
            }
            if (s.equals("x")) {
                if (num < tmp) num = tmp;
                tmp = 0;
            }
        }
        System.out.println(num);
    }
}
0