結果

問題 No.341 沈黙の期間
ユーザー GrenacheGrenache
提出日時 2016-02-12 22:22:04
言語 Java19
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 489 bytes
コンパイル時間 5,213 ms
コンパイル使用メモリ 75,048 KB
実行使用メモリ 57,596 KB
最終ジャッジ日時 2023-10-22 02:45:26
合計ジャッジ時間 8,371 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
57,388 KB
testcase_01 AC 135 ms
57,460 KB
testcase_02 AC 134 ms
57,392 KB
testcase_03 AC 130 ms
57,596 KB
testcase_04 AC 132 ms
57,388 KB
testcase_05 AC 133 ms
57,396 KB
testcase_06 AC 133 ms
57,380 KB
testcase_07 AC 136 ms
57,428 KB
testcase_08 AC 135 ms
57,408 KB
testcase_09 AC 134 ms
57,504 KB
testcase_10 AC 137 ms
57,168 KB
testcase_11 AC 134 ms
57,480 KB
testcase_12 AC 135 ms
57,376 KB
testcase_13 AC 134 ms
57,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder341 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        char[] s = sc.next().toCharArray();

        int max = 0;
        int len = 0;
        for (int i = 0; i < s.length; i++) {
        	if (s[i] == '…') {
        		len++;
        		max = Math.max(max, len);
        	} else {
        		len = 0;
        	}
        }

        System.out.println(max);

        sc.close();
    }
}
0