結果

問題 No.341 沈黙の期間
ユーザー holegumaholeguma
提出日時 2016-02-18 22:22:38
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 811 bytes
コンパイル時間 2,371 ms
コンパイル使用メモリ 75,636 KB
実行使用メモリ 53,604 KB
最終ジャッジ日時 2023-10-23 18:15:39
合計ジャッジ時間 3,918 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
53,508 KB
testcase_01 AC 57 ms
53,512 KB
testcase_02 WA -
testcase_03 AC 56 ms
51,548 KB
testcase_04 AC 55 ms
53,508 KB
testcase_05 AC 55 ms
53,512 KB
testcase_06 AC 60 ms
53,508 KB
testcase_07 AC 59 ms
53,500 KB
testcase_08 AC 57 ms
53,512 KB
testcase_09 AC 55 ms
51,492 KB
testcase_10 AC 59 ms
53,508 KB
testcase_11 AC 58 ms
53,512 KB
testcase_12 WA -
testcase_13 AC 58 ms
53,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;

public class Main{

	static PrintWriter out;
	static BufferedReader ir;

	static void solve() throws IOException{
		char[] s=ir.readLine().toCharArray();
		int cnt=0,ma=0;
		for(int i=0;i<s.length;i++){
			if(s[i]=='…') cnt++;
			else{
				ma=Math.max(ma,cnt);
				cnt=0;
			}
		}
		out.println(ma);
	}

	public static void main(String[] args) throws Exception{
		ir=new BufferedReader(new InputStreamReader(System.in,"UTF-8"));
		out=new PrintWriter(System.out);
		solve();
		out.flush();
	}
}
0