結果
問題 | No.341 沈黙の期間 |
ユーザー |
![]() |
提出日時 | 2016-07-02 12:12:33 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 131 ms / 5,000 ms |
コード長 | 380 bytes |
コンパイル時間 | 2,098 ms |
コンパイル使用メモリ | 74,092 KB |
実行使用メモリ | 54,352 KB |
最終ジャッジ日時 | 2024-10-12 02:26:46 |
合計ジャッジ時間 | 4,688 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
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);}}