結果
| 問題 | No.341 沈黙の期間 |
| コンテスト | |
| ユーザー |
sasakki
|
| 提出日時 | 2016-03-10 11:08:35 |
| 言語 | Java (openjdk 27 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 144 ms / 5,000 ms |
| + 906µs | |
| コード長 | 428 bytes |
| 記録 | |
| コンパイル時間 | 1,854 ms |
| コンパイル使用メモリ | 93,556 KB |
| 実行使用メモリ | 48,248 KB |
| 最終ジャッジ日時 | 2026-11-02 10:25:05 |
| 合計ジャッジ時間 | 5,600 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
import java.util.Scanner;
class main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int count = 0;
int max = 0;
String str = scan.next();
for(int i = 0; i < str.length(); i++){
char ch = str.charAt(i);
if(ch == '…'){
count++;
}
else{
max = Math.max(count, max);
count = 0;
}
}
max = Math.max(count, max);
System.out.println(max);
}
}
sasakki