結果

問題 No.341 沈黙の期間
ユーザー tentententen
提出日時 2020-12-07 13:59:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 435 bytes
コンパイル時間 2,026 ms
コンパイル使用メモリ 74,344 KB
実行使用メモリ 57,624 KB
最終ジャッジ日時 2023-10-17 16:28:52
合計ジャッジ時間 4,633 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
57,400 KB
testcase_01 AC 123 ms
57,420 KB
testcase_02 AC 123 ms
57,436 KB
testcase_03 AC 123 ms
57,624 KB
testcase_04 AC 111 ms
56,212 KB
testcase_05 AC 126 ms
57,476 KB
testcase_06 AC 124 ms
57,372 KB
testcase_07 AC 122 ms
57,600 KB
testcase_08 AC 125 ms
57,392 KB
testcase_09 AC 126 ms
57,300 KB
testcase_10 AC 128 ms
57,436 KB
testcase_11 AC 126 ms
57,548 KB
testcase_12 AC 127 ms
57,300 KB
testcase_13 AC 126 ms
57,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int max = 0;
        int count = 0;
        for (char c : sc.nextLine().toCharArray()) {
            if (c == '…') {
                count++;
            } else {
                count = 0;
            }
            max = Math.max(max, count);
        }
        System.out.println(max);
    }
}
0