結果
| 問題 |
No.341 沈黙の期間
|
| コンテスト | |
| ユーザー |
boobright
|
| 提出日時 | 2016-03-19 09:05:08 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 5,000 ms |
| コード長 | 585 bytes |
| コンパイル時間 | 2,191 ms |
| コンパイル使用メモリ | 74,532 KB |
| 実行使用メモリ | 50,392 KB |
| 最終ジャッジ日時 | 2024-10-01 09:13:07 |
| 合計ジャッジ時間 | 3,343 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String args[] ) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
int max = 0;
boolean ten = false;
int cnt = 0;
for (int i = 0; i <= line.length(); i++) {
if (i != line.length() && line.charAt(i) == '…') {
ten = true;
cnt++;
} else {
if (ten) {
if (max < cnt) {
max = cnt;
}
cnt = 0;
ten = false;
}
}
}
System.out.println(max);
}
}
boobright