結果
問題 | No.341 沈黙の期間 |
ユーザー | uafr_cs |
提出日時 | 2016-02-12 22:24:13 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 129 ms / 5,000 ms |
コード長 | 528 bytes |
コンパイル時間 | 2,217 ms |
コンパイル使用メモリ | 74,928 KB |
実行使用メモリ | 54,324 KB |
最終ジャッジ日時 | 2024-09-22 04:20:19 |
合計ジャッジ時間 | 4,682 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] inputs = sc.next().toCharArray(); int max = 0; int count = 0; for(int i = 0; i < inputs.length; i++){ if(inputs[i] == '…'){ count++; }else{ max = Math.max(max, count); count = 0; } } max = Math.max(max, count); System.out.println(max); } }