結果

問題 No.341 沈黙の期間
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-11 23:29:41
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 376 bytes
コンパイル時間 2,296 ms
コンパイル使用メモリ 74,960 KB
実行使用メモリ 54,324 KB
最終ジャッジ日時 2024-05-01 09:27:31
合計ジャッジ時間 4,652 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
54,112 KB
testcase_01 AC 125 ms
54,088 KB
testcase_02 AC 122 ms
53,988 KB
testcase_03 AC 125 ms
54,076 KB
testcase_04 AC 123 ms
53,880 KB
testcase_05 AC 123 ms
53,964 KB
testcase_06 AC 123 ms
53,788 KB
testcase_07 AC 125 ms
53,900 KB
testcase_08 AC 122 ms
54,212 KB
testcase_09 AC 123 ms
54,232 KB
testcase_10 AC 123 ms
54,088 KB
testcase_11 WA -
testcase_12 AC 123 ms
53,760 KB
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		String s = sc.next();
		int leng = 0;
		int max = -1;
		for (int i=0; i<s.length(); i++) {
			char c = s.charAt(i);
			if (c=='…') {
				leng++;
				max = Math.max(max,leng);
			}
			else {
				leng = 0;
			}
		}
		System.out.println(max);
	}
}
0