結果
| 問題 |
No.341 沈黙の期間
|
| コンテスト | |
| ユーザー |
holeguma
|
| 提出日時 | 2016-02-18 22:22:38 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 811 bytes |
| コンパイル時間 | 2,116 ms |
| コンパイル使用メモリ | 76,132 KB |
| 実行使用メモリ | 50,596 KB |
| 最終ジャッジ日時 | 2024-09-22 12:05:51 |
| 合計ジャッジ時間 | 3,511 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 10 WA * 1 |
ソースコード
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();
}
}
holeguma