結果
問題 |
No.341 沈黙の期間
|
ユーザー |
![]() |
提出日時 | 2016-02-18 22:24:21 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 54 ms / 5,000 ms |
コード長 | 834 bytes |
コンパイル時間 | 2,078 ms |
コンパイル使用メモリ | 76,380 KB |
実行使用メモリ | 50,568 KB |
最終ジャッジ日時 | 2024-09-22 12:05:55 |
合計ジャッジ時間 | 3,455 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out; static BufferedReader ir; static void solve() throws IOException{ char[] s=ir.readLine().toCharArray(); int cnt=0,ma=0; for(int i=0;i<s.length;i++){ if(s[i]=='…') cnt++; else{ ma=Math.max(ma,cnt); cnt=0; } } ma=Math.max(cnt,ma); out.println(ma); } public static void main(String[] args) throws Exception{ ir=new BufferedReader(new InputStreamReader(System.in,"UTF-8")); out=new PrintWriter(System.out); solve(); out.flush(); } }