結果

問題 No.341 沈黙の期間
ユーザー tsunabittsunabit
提出日時 2019-05-26 21:22:26
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 603 bytes
コンパイル時間 3,397 ms
コンパイル使用メモリ 75,612 KB
実行使用メモリ 57,532 KB
最終ジャッジ日時 2023-10-17 18:04:56
合計ジャッジ時間 5,993 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
57,388 KB
testcase_01 AC 125 ms
57,492 KB
testcase_02 WA -
testcase_03 AC 128 ms
57,484 KB
testcase_04 AC 126 ms
57,468 KB
testcase_05 AC 126 ms
57,472 KB
testcase_06 AC 125 ms
57,076 KB
testcase_07 AC 126 ms
57,440 KB
testcase_08 AC 125 ms
57,460 KB
testcase_09 AC 126 ms
57,480 KB
testcase_10 AC 127 ms
57,532 KB
testcase_11 AC 127 ms
57,480 KB
testcase_12 WA -
testcase_13 AC 126 ms
57,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Scanner;
import java.util.Collections;
import java.util.Arrays;

public class No341 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner s = new Scanner(System.in);
        String ss = s.next();
        char[] a = ss.toCharArray();
        int max = 0, c = 0;
        for(char b : a) {
        	if('…' == b) {
        		c += 1;
        	}else {
        		max = max < c? c : max;
        		c = 0;
        	}
        }
        System.out.println(max);
    }
}
0