結果
問題 | No.341 沈黙の期間 |
ユーザー | yun_app |
提出日時 | 2016-05-09 20:03:50 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 58 ms / 5,000 ms |
コード長 | 727 bytes |
コンパイル時間 | 2,148 ms |
コンパイル使用メモリ | 74,444 KB |
実行使用メモリ | 37,092 KB |
最終ジャッジ日時 | 2024-04-15 14:57:26 |
合計ジャッジ時間 | 3,785 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 54 ms
37,048 KB |
testcase_01 | AC | 56 ms
36,940 KB |
testcase_02 | AC | 56 ms
36,996 KB |
testcase_03 | AC | 53 ms
37,016 KB |
testcase_04 | AC | 54 ms
36,916 KB |
testcase_05 | AC | 58 ms
36,688 KB |
testcase_06 | AC | 57 ms
36,960 KB |
testcase_07 | AC | 58 ms
37,040 KB |
testcase_08 | AC | 58 ms
36,864 KB |
testcase_09 | AC | 55 ms
36,808 KB |
testcase_10 | AC | 53 ms
37,092 KB |
testcase_11 | AC | 53 ms
37,048 KB |
testcase_12 | AC | 56 ms
36,680 KB |
testcase_13 | AC | 56 ms
36,992 KB |
ソースコード
/* 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); } }