結果

問題 No.341 沈黙の期間
ユーザー fjafjafjafjafjafja
提出日時 2017-09-17 22:43:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 51 ms / 5,000 ms
コード長 519 bytes
コンパイル時間 2,829 ms
コンパイル使用メモリ 75,296 KB
実行使用メモリ 50,476 KB
最終ジャッジ日時 2024-04-25 15:02:12
合計ジャッジ時間 4,188 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
49,932 KB
testcase_01 AC 49 ms
50,068 KB
testcase_02 AC 50 ms
50,320 KB
testcase_03 AC 49 ms
50,304 KB
testcase_04 AC 50 ms
50,288 KB
testcase_05 AC 51 ms
50,476 KB
testcase_06 AC 50 ms
50,136 KB
testcase_07 AC 51 ms
50,092 KB
testcase_08 AC 51 ms
50,372 KB
testcase_09 AC 48 ms
50,032 KB
testcase_10 AC 49 ms
50,252 KB
testcase_11 AC 48 ms
49,896 KB
testcase_12 AC 48 ms
50,308 KB
testcase_13 AC 48 ms
50,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class N341 {

	public static void main(String[] args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str=br.readLine();
		int cnt=0;
		int max=0;
		for(int i=0;i<str.length();i++)
		{
			if(str.substring(i, i+1).equals("…"))
			{
				cnt++;
				max=(cnt>max)?cnt:max;
			}
			else
			{
				cnt=0;
			}
		}
		System.out.println(max);
	}

}
0