結果

問題 No.341 沈黙の期間
ユーザー fjafjafjafjafjafja
提出日時 2017-09-17 22:43:37
言語 Java19
(openjdk 21)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 519 bytes
コンパイル時間 2,860 ms
コンパイル使用メモリ 71,600 KB
実行使用メモリ 49,600 KB
最終ジャッジ日時 2023-08-07 20:37:56
合計ジャッジ時間 4,384 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,196 KB
testcase_01 AC 41 ms
49,192 KB
testcase_02 AC 42 ms
49,268 KB
testcase_03 AC 42 ms
49,600 KB
testcase_04 AC 42 ms
49,600 KB
testcase_05 AC 42 ms
49,340 KB
testcase_06 AC 43 ms
49,196 KB
testcase_07 AC 41 ms
49,316 KB
testcase_08 AC 41 ms
49,240 KB
testcase_09 AC 41 ms
49,160 KB
testcase_10 AC 40 ms
49,260 KB
testcase_11 AC 40 ms
49,364 KB
testcase_12 AC 42 ms
49,272 KB
testcase_13 AC 41 ms
49,420 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