結果

問題 No.341 沈黙の期間
ユーザー TakaTaka
提出日時 2016-11-01 20:07:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 475 bytes
コンパイル時間 3,700 ms
コンパイル使用メモリ 72,920 KB
実行使用メモリ 55,976 KB
最終ジャッジ日時 2023-08-16 12:27:56
合計ジャッジ時間 5,672 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
55,712 KB
testcase_01 AC 118 ms
55,944 KB
testcase_02 AC 116 ms
55,600 KB
testcase_03 AC 115 ms
55,656 KB
testcase_04 AC 115 ms
55,432 KB
testcase_05 AC 116 ms
55,976 KB
testcase_06 AC 117 ms
55,844 KB
testcase_07 AC 115 ms
55,800 KB
testcase_08 AC 115 ms
55,892 KB
testcase_09 AC 116 ms
55,804 KB
testcase_10 AC 117 ms
55,512 KB
testcase_11 AC 116 ms
55,652 KB
testcase_12 AC 117 ms
55,872 KB
testcase_13 AC 113 ms
55,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class a{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		String a=sc.next();
		
		int tmp[]=new int[50];
		for(int j=0; j<50; j++){
			tmp[j]=0;
		}
		
		int num=0, max=0;
		
		for(int i=0; i<a.length(); i++){
			if(a.charAt(i)!='…' && tmp[num]>0)	num++;
			if(a.charAt(i)=='…')	tmp[num]++;
		}
		for(int j=0; j<50; j++){
			if(tmp[j]>max)	max=tmp[j];
		}
		
		System.out.println(max);
    }
}
0