結果

問題 No.341 沈黙の期間
ユーザー y32M-71693993y32M-71693993
提出日時 2016-02-12 22:42:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 403 bytes
コンパイル時間 2,140 ms
コンパイル使用メモリ 74,460 KB
実行使用メモリ 57,564 KB
最終ジャッジ日時 2023-10-22 03:16:45
合計ジャッジ時間 4,727 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
57,388 KB
testcase_01 AC 131 ms
57,436 KB
testcase_02 AC 132 ms
57,348 KB
testcase_03 AC 129 ms
57,380 KB
testcase_04 AC 129 ms
57,412 KB
testcase_05 AC 131 ms
57,352 KB
testcase_06 AC 130 ms
57,380 KB
testcase_07 AC 129 ms
57,396 KB
testcase_08 AC 130 ms
57,396 KB
testcase_09 AC 130 ms
55,412 KB
testcase_10 AC 134 ms
57,564 KB
testcase_11 AC 131 ms
57,536 KB
testcase_12 AC 134 ms
57,332 KB
testcase_13 AC 130 ms
57,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main{
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		String str = in.nextLine();
		Matcher matcher = Pattern.compile("…+").matcher(str);
		int ans = 0;
		while(matcher.find()){
			ans = Math.max(ans, matcher.group().length());
		}
		System.out.println(ans);
	}
}
0