結果

問題 No.341 沈黙の期間
ユーザー sasakkisasakki
提出日時 2016-03-10 11:08:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 428 bytes
コンパイル時間 3,091 ms
コンパイル使用メモリ 74,412 KB
実行使用メモリ 57,568 KB
最終ジャッジ日時 2023-10-24 22:20:18
合計ジャッジ時間 4,916 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
55,224 KB
testcase_01 AC 127 ms
57,512 KB
testcase_02 AC 131 ms
57,428 KB
testcase_03 AC 132 ms
57,568 KB
testcase_04 AC 129 ms
57,504 KB
testcase_05 AC 126 ms
57,440 KB
testcase_06 AC 127 ms
57,180 KB
testcase_07 AC 128 ms
57,536 KB
testcase_08 AC 129 ms
57,480 KB
testcase_09 AC 129 ms
57,480 KB
testcase_10 AC 131 ms
57,552 KB
testcase_11 AC 130 ms
57,424 KB
testcase_12 AC 128 ms
57,496 KB
testcase_13 AC 129 ms
57,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class main{
    public static void main(String args[]){
	Scanner scan = new Scanner(System.in);
	int count = 0;
	int max = 0;
	String str = scan.next();

	for(int i = 0; i < str.length(); i++){
	    char ch = str.charAt(i);
	    if(ch == '…'){
		count++;
	    }
	    else{
	        max = Math.max(count, max);
		count = 0;
	    }
	}

	max = Math.max(count, max);

	System.out.println(max);

    }
}
0