結果
問題 |
No.341 沈黙の期間
|
ユーザー |
![]() |
提出日時 | 2017-09-17 22:43:37 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 55 ms / 5,000 ms |
コード長 | 519 bytes |
コンパイル時間 | 3,353 ms |
コンパイル使用メモリ | 73,312 KB |
実行使用メモリ | 37,092 KB |
最終ジャッジ日時 | 2024-11-08 02:00:41 |
合計ジャッジ時間 | 4,918 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
package yukicoder; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class N341 { public static void main(String[] args)throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String str=br.readLine(); int cnt=0; int max=0; for(int i=0;i<str.length();i++) { if(str.substring(i, i+1).equals("…")) { cnt++; max=(cnt>max)?cnt:max; } else { cnt=0; } } System.out.println(max); } }