結果
問題 | No.341 沈黙の期間 |
ユーザー | ぴろず |
提出日時 | 2016-02-12 22:22:03 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 119 ms / 5,000 ms |
コード長 | 423 bytes |
コンパイル時間 | 2,295 ms |
コンパイル使用メモリ | 77,548 KB |
実行使用メモリ | 57,480 KB |
最終ジャッジ日時 | 2023-10-22 02:45:05 |
合計ジャッジ時間 | 4,131 ms |
ジャッジサーバーID (参考情報) |
judge10 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 109 ms
55,388 KB |
testcase_01 | AC | 111 ms
57,400 KB |
testcase_02 | AC | 119 ms
57,152 KB |
testcase_03 | AC | 106 ms
56,208 KB |
testcase_04 | AC | 111 ms
57,096 KB |
testcase_05 | AC | 113 ms
57,480 KB |
testcase_06 | AC | 115 ms
57,404 KB |
testcase_07 | AC | 109 ms
57,104 KB |
testcase_08 | AC | 112 ms
57,432 KB |
testcase_09 | AC | 115 ms
57,240 KB |
testcase_10 | AC | 114 ms
57,388 KB |
testcase_11 | AC | 111 ms
57,404 KB |
testcase_12 | AC | 113 ms
57,396 KB |
testcase_13 | AC | 112 ms
55,344 KB |
ソースコード
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); } }