結果
問題 |
No.341 沈黙の期間
|
ユーザー |
![]() |
提出日時 | 2016-05-09 20:03:50 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 54 ms / 5,000 ms |
コード長 | 727 bytes |
コンパイル時間 | 2,143 ms |
コンパイル使用メモリ | 73,964 KB |
実行使用メモリ | 37,144 KB |
最終ジャッジ日時 | 2024-10-05 13:11:39 |
合計ジャッジ時間 | 3,835 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { public static void main (String[] args) throws java.lang.Exception { // your code goes here BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); int cnt = 0; int max = 0; for(int i=0;i<line.length();i++){ char c = line.charAt(i); if(c == '…'){ cnt++; }else{ max = Math.max(max,cnt); cnt=0; } } max = Math.max(max,cnt); System.out.println(max); } }