結果
| 問題 |
No.341 沈黙の期間
|
| コンテスト | |
| ユーザー |
ぴろず
|
| 提出日時 | 2016-02-12 22:22:03 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 127 ms / 5,000 ms |
| コード長 | 423 bytes |
| コンパイル時間 | 2,120 ms |
| コンパイル使用メモリ | 75,400 KB |
| 実行使用メモリ | 54,348 KB |
| 最終ジャッジ日時 | 2024-09-22 04:18:47 |
| 合計ジャッジ時間 | 4,421 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
package no341;
import java.util.Scanner;
public class Main {
public static final char dots = '…';
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
int max = 0;
int len = 0;
for(int i=0;i<s.length();i++) {
char c = s.charAt(i);
if (c == dots) {
len++;
max = Math.max(max, len);
}else{
len = 0;
}
}
System.out.println(max);
}
}
ぴろず