結果
問題 | No.341 沈黙の期間 |
ユーザー | sasakki |
提出日時 | 2016-03-09 21:49:21 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 487 bytes |
コンパイル時間 | 4,117 ms |
コンパイル使用メモリ | 74,232 KB |
実行使用メモリ | 57,860 KB |
最終ジャッジ日時 | 2023-10-24 21:55:45 |
合計ジャッジ時間 | 5,028 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 131 ms
57,268 KB |
testcase_01 | AC | 128 ms
57,468 KB |
testcase_02 | AC | 129 ms
57,412 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 129 ms
57,528 KB |
testcase_06 | AC | 129 ms
57,664 KB |
testcase_07 | AC | 127 ms
57,488 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 127 ms
57,564 KB |
testcase_11 | AC | 128 ms
57,400 KB |
testcase_12 | AC | 129 ms
57,536 KB |
testcase_13 | AC | 129 ms
57,448 KB |
ソースコード
import java.util.Scanner; class main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int count = 0; int max = 0; String str = scan.next(); for(int i = 0; i < str.length(); i++){ char ch = str.charAt(i); if(ch == '…'){ count++; if(i == str.length() - 1){ if(max < count){ max = count; } } } else{ if(max < count){ max = count; count = 0; } } } System.out.println(max); } }