結果

問題 No.341 沈黙の期間
ユーザー uwiuwi
提出日時 2016-02-12 22:23:37
言語 Java
(openjdk 23)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 880 bytes
コンパイル時間 3,725 ms
コンパイル使用メモリ 78,504 KB
実行使用メモリ 54,628 KB
最終ジャッジ日時 2024-09-22 04:20:00
合計ジャッジ時間 6,264 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class AA2 {
	static Scanner in;
	static PrintWriter out;
	static String INPUT = "";
	
	static void solve()
	{
		char[] s = in.nextLine().toCharArray();
		int dot = 0;
		int max = 0;
		for(char c : s){
			if(c == '…'){
				dot++;
			}else{
				dot = 0;
			}
			if(dot > max)max = dot;
		}
		out.println(max);
	}
	
	public static void main(String[] args) throws Exception
	{
		in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT);
		out = new PrintWriter(System.out);
		
		solve();
		out.flush();
	}
	
	static int ni() { return Integer.parseInt(in.next()); }
	static long nl() { return Long.parseLong(in.next()); }
	static double nd() { return Double.parseDouble(in.next()); }
	static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); }
}
0