結果

問題 No.341 沈黙の期間
ユーザー uafr_csuafr_cs
提出日時 2016-02-12 22:24:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 528 bytes
コンパイル時間 2,381 ms
コンパイル使用メモリ 75,032 KB
実行使用メモリ 57,424 KB
最終ジャッジ日時 2023-10-22 02:46:45
合計ジャッジ時間 5,064 ms
ジャッジサーバーID
(参考情報)
judge13 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
57,132 KB
testcase_01 AC 135 ms
57,356 KB
testcase_02 AC 134 ms
57,424 KB
testcase_03 AC 135 ms
55,048 KB
testcase_04 AC 134 ms
57,344 KB
testcase_05 AC 134 ms
57,376 KB
testcase_06 AC 134 ms
57,336 KB
testcase_07 AC 134 ms
57,396 KB
testcase_08 AC 135 ms
57,116 KB
testcase_09 AC 135 ms
57,408 KB
testcase_10 AC 135 ms
57,356 KB
testcase_11 AC 133 ms
57,332 KB
testcase_12 AC 136 ms
57,376 KB
testcase_13 AC 134 ms
55,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		char[] inputs = sc.next().toCharArray();
		
		int max = 0;
		int count = 0;
		
		for(int i = 0; i < inputs.length; i++){
			if(inputs[i] == '…'){
				count++;
			}else{
				max = Math.max(max, count);
				count = 0;
			}
		}
		max = Math.max(max, count);
		
		System.out.println(max);
	}

}
0