結果

問題 No.341 沈黙の期間
ユーザー mizunomi32mizunomi32
提出日時 2016-02-28 22:50:48
言語 Java19
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 584 bytes
コンパイル時間 3,114 ms
コンパイル使用メモリ 75,480 KB
実行使用メモリ 57,584 KB
最終ジャッジ日時 2023-10-24 18:55:31
合計ジャッジ時間 5,525 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
57,412 KB
testcase_01 AC 118 ms
57,332 KB
testcase_02 AC 124 ms
57,528 KB
testcase_03 AC 124 ms
57,336 KB
testcase_04 AC 118 ms
57,424 KB
testcase_05 AC 120 ms
57,424 KB
testcase_06 AC 120 ms
57,584 KB
testcase_07 AC 119 ms
57,420 KB
testcase_08 AC 114 ms
57,196 KB
testcase_09 AC 115 ms
57,384 KB
testcase_10 AC 120 ms
57,328 KB
testcase_11 AC 119 ms
57,376 KB
testcase_12 AC 119 ms
57,420 KB
testcase_13 AC 119 ms
57,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #



import java.util.Scanner;

public class main {
    public static void main(String[] args){
        Scanner sc= new Scanner(System.in);
        String S = sc.next();
        char[] chars = S.toCharArray();
        int lengths =S.length();
        int i=0;
        int count=0;
        int oldcount=0;

        for(;i<lengths;i++){
            if(chars[i]=='…'){
                count++;
            }else{
                count=0;
            }
            if(oldcount<count){
                oldcount=count;
            }

        }
        System.out.println(oldcount);
    }
}
0