結果

問題 No.341 沈黙の期間
ユーザー 37zigen37zigen
提出日時 2016-03-11 01:54:40
言語 Java19
(openjdk 21)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 336 bytes
コンパイル時間 2,098 ms
コンパイル使用メモリ 75,160 KB
実行使用メモリ 57,616 KB
最終ジャッジ日時 2023-10-25 04:10:54
合計ジャッジ時間 4,861 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
57,288 KB
testcase_01 AC 124 ms
57,616 KB
testcase_02 AC 124 ms
57,368 KB
testcase_03 AC 123 ms
57,400 KB
testcase_04 AC 125 ms
57,492 KB
testcase_05 AC 125 ms
57,608 KB
testcase_06 AC 126 ms
57,544 KB
testcase_07 AC 127 ms
55,448 KB
testcase_08 AC 123 ms
57,616 KB
testcase_09 AC 122 ms
57,560 KB
testcase_10 AC 130 ms
57,536 KB
testcase_11 AC 124 ms
57,424 KB
testcase_12 AC 125 ms
57,496 KB
testcase_13 AC 126 ms
57,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		String str=sc.next();
		int cnt=0;
		int ans=0;
		for(int i=0;i<str.length();i++){
			if(str.charAt(i)=='…'){
				cnt++;
			}else{
				cnt=0;
			}
			ans=Math.max(cnt, ans);
		}
		System.out.println(ans);
	}
}
0