結果
| 問題 | No.341 沈黙の期間 |
| コンテスト | |
| ユーザー |
mits58
|
| 提出日時 | 2016-07-02 12:12:33 |
| 言語 | Java (openjdk 27.0.1.0.3 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 134 ms / 5,000 ms |
| + 196µs | |
| コード長 | 380 bytes |
| 記録 | |
| コンパイル時間 | 2,153 ms |
| コンパイル使用メモリ | 93,388 KB |
| 実行使用メモリ | 48,268 KB |
| 最終ジャッジ日時 | 2026-11-10 17:55:03 |
| 合計ジャッジ時間 | 5,772 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
String str=sc.next();
int ans=0;
for(int i=0;i<str.length();i++){
if(str.charAt(i)=='…'){
int t=1; i++;
while(i<str.length() && str.charAt(i)=='…'){
t++; i++;
}
ans=Math.max(ans,t);
}
}
System.out.println(ans);
}
}
mits58