結果

問題 No.341 沈黙の期間
ユーザー tsunabit
提出日時 2019-05-26 21:22:26
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 603 bytes
コンパイル時間 3,492 ms
コンパイル使用メモリ 78,428 KB
実行使用メモリ 54,136 KB
最終ジャッジ日時 2024-09-17 15:23:18
合計ジャッジ時間 5,844 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 10 WA * 1
権限があれば一括ダウンロードができます

ソースコード

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