結果

問題 No.341 沈黙の期間
ユーザー TakaTaka
提出日時 2016-11-01 20:15:58
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 476 bytes
コンパイル時間 3,256 ms
コンパイル使用メモリ 72,068 KB
実行使用メモリ 57,804 KB
最終ジャッジ日時 2023-08-16 12:27:26
合計ジャッジ時間 5,921 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
55,756 KB
testcase_01 WA -
testcase_02 AC 116 ms
55,792 KB
testcase_03 WA -
testcase_04 AC 116 ms
55,972 KB
testcase_05 WA -
testcase_06 AC 113 ms
55,720 KB
testcase_07 WA -
testcase_08 AC 114 ms
55,344 KB
testcase_09 WA -
testcase_10 AC 115 ms
55,752 KB
testcase_11 WA -
testcase_12 AC 114 ms
55,756 KB
testcase_13 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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