結果

問題 No.341 沈黙の期間
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-05-20 20:12:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 365 bytes
コンパイル時間 2,180 ms
コンパイル使用メモリ 76,916 KB
実行使用メモリ 56,132 KB
最終ジャッジ日時 2023-09-11 00:07:55
合計ジャッジ時間 4,824 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,796 KB
testcase_01 AC 123 ms
55,792 KB
testcase_02 AC 125 ms
55,800 KB
testcase_03 AC 133 ms
55,716 KB
testcase_04 AC 127 ms
55,708 KB
testcase_05 AC 127 ms
56,132 KB
testcase_06 AC 126 ms
55,532 KB
testcase_07 AC 126 ms
55,800 KB
testcase_08 AC 126 ms
55,876 KB
testcase_09 AC 126 ms
56,036 KB
testcase_10 AC 126 ms
56,016 KB
testcase_11 AC 123 ms
55,872 KB
testcase_12 AC 127 ms
55,776 KB
testcase_13 AC 128 ms
56,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import static java.lang.System.*;
import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		String s = sc.next();
		List<String> list = Arrays.asList(s.split("[^…]"));
		list.sort(Comparator.comparingInt(String::length).reversed());
		out.println(list.size()==0?0:list.get(0).length());
	}
}
0