結果

問題 No.341 沈黙の期間
ユーザー tsunabittsunabit
提出日時 2019-05-26 21:21:36
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 601 bytes
コンパイル時間 3,357 ms
コンパイル使用メモリ 75,632 KB
実行使用メモリ 57,720 KB
最終ジャッジ日時 2023-10-17 18:04:45
合計ジャッジ時間 6,122 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 125 ms
57,364 KB
testcase_02 AC 125 ms
57,548 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 125 ms
57,424 KB
testcase_12 AC 128 ms
57,460 KB
testcase_13 AC 126 ms
57,440 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(c);
    }
}
0