結果

問題 No.341 沈黙の期間
ユーザー chiyoda
提出日時 2016-06-22 12:22:17
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 416 bytes
コンパイル時間 2,125 ms
コンパイル使用メモリ 74,232 KB
実行使用メモリ 54,264 KB
最終ジャッジ日時 2024-10-11 19:17:23
合計ジャッジ時間 4,724 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 10 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public  class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.nextLine();
    int cnt = 0;
    int max  = 0;
    for (int i = 0; i < s.length(); i++) {
        if (s.charAt(i) == '…') {
           cnt++;
        } else {
          max = Math.max(cnt, max);
          cnt = 0;
        }
    }
    System.out.println(max);
  }
}
0