結果
問題 | No.341 沈黙の期間 |
ユーザー |
![]() |
提出日時 | 2016-02-13 00:29:32 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 128 ms / 5,000 ms |
コード長 | 541 bytes |
コンパイル時間 | 1,989 ms |
コンパイル使用メモリ | 74,476 KB |
実行使用メモリ | 54,348 KB |
最終ジャッジ日時 | 2024-09-22 05:10:24 |
合計ジャッジ時間 | 4,475 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
import java.util.Scanner;class Main {public static final char dots = '…';public static void main(String[] args) throws Exception {Scanner in = new Scanner(System.in);String s = in.next();int max = 0;int len = 0;for(int i=0; i<s.length(); i++) {char c = s.charAt(i);if(c == dots) {len++;max = Math.max(max, len);} else {len = 0;}}System.out.println(max);}}