結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー yun_appyun_app
提出日時 2016-05-12 11:54:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 45 ms / 1,000 ms
コード長 847 bytes
コンパイル時間 2,062 ms
コンパイル使用メモリ 72,792 KB
実行使用メモリ 51,380 KB
最終ジャッジ日時 2023-08-11 16:09:41
合計ジャッジ時間 4,521 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,464 KB
testcase_01 AC 44 ms
49,480 KB
testcase_02 AC 43 ms
49,348 KB
testcase_03 AC 43 ms
47,604 KB
testcase_04 AC 44 ms
49,348 KB
testcase_05 AC 45 ms
49,428 KB
testcase_06 AC 44 ms
49,320 KB
testcase_07 AC 45 ms
49,364 KB
testcase_08 AC 44 ms
49,496 KB
testcase_09 AC 44 ms
49,460 KB
testcase_10 AC 44 ms
49,424 KB
testcase_11 AC 45 ms
51,380 KB
testcase_12 AC 44 ms
49,468 KB
testcase_13 AC 44 ms
49,556 KB
testcase_14 AC 43 ms
49,652 KB
testcase_15 AC 45 ms
49,488 KB
testcase_16 AC 44 ms
49,548 KB
testcase_17 AC 44 ms
49,444 KB
testcase_18 AC 45 ms
49,312 KB
testcase_19 AC 45 ms
49,720 KB
testcase_20 AC 44 ms
49,428 KB
testcase_21 AC 43 ms
49,292 KB
testcase_22 AC 45 ms
49,308 KB
testcase_23 AC 44 ms
49,472 KB
testcase_24 AC 43 ms
49,420 KB
testcase_25 AC 43 ms
49,356 KB
testcase_26 AC 43 ms
49,484 KB
testcase_27 AC 43 ms
49,820 KB
testcase_28 AC 43 ms
49,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        int max = 0;
        int cnt = 0;
        while(line!=null){
            for(String st:line.split("")){
                if(st.equals("o")){
                    cnt++;
                }else{
                    max = Math.max(max,cnt);
                    cnt = 0;
                }
            }
            line = br.readLine();
        }
        max = Math.max(max,cnt);
        System.out.println(max);
    }

}
0