結果

問題 No.341 沈黙の期間
ユーザー neko_the_shadowneko_the_shadow
提出日時 2019-03-01 10:51:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 386 bytes
コンパイル時間 2,447 ms
コンパイル使用メモリ 75,924 KB
実行使用メモリ 56,036 KB
最終ジャッジ日時 2023-09-05 16:28:36
合計ジャッジ時間 4,800 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,988 KB
testcase_01 AC 121 ms
55,932 KB
testcase_02 AC 120 ms
55,780 KB
testcase_03 AC 121 ms
55,784 KB
testcase_04 AC 123 ms
55,804 KB
testcase_05 AC 120 ms
55,864 KB
testcase_06 AC 119 ms
55,844 KB
testcase_07 AC 120 ms
54,464 KB
testcase_08 AC 122 ms
55,532 KB
testcase_09 AC 124 ms
55,760 KB
testcase_10 AC 128 ms
56,004 KB
testcase_11 AC 124 ms
55,788 KB
testcase_12 AC 125 ms
56,036 KB
testcase_13 AC 123 ms
55,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.OptionalInt;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner stdin = new Scanner(System.in);
        String s = stdin.nextLine();
        
        OptionalInt ans = Arrays.stream(s.split("[^\\…]+")).mapToInt(String::length).max();
        System.out.println(ans.orElse(0));
    }
}
0