結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー | kuramu |
提出日時 | 2016-01-26 00:09:53 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 48 ms / 1,000 ms |
コード長 | 939 bytes |
コンパイル時間 | 2,364 ms |
コンパイル使用メモリ | 82,712 KB |
実行使用メモリ | 50,164 KB |
最終ジャッジ日時 | 2023-08-11 16:06:01 |
合計ジャッジ時間 | 4,659 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 47 ms
49,664 KB |
testcase_01 | AC | 47 ms
49,424 KB |
testcase_02 | AC | 46 ms
49,536 KB |
testcase_03 | AC | 47 ms
47,560 KB |
testcase_04 | AC | 47 ms
49,484 KB |
testcase_05 | AC | 47 ms
49,488 KB |
testcase_06 | AC | 47 ms
49,380 KB |
testcase_07 | AC | 47 ms
49,432 KB |
testcase_08 | AC | 46 ms
49,332 KB |
testcase_09 | AC | 47 ms
49,340 KB |
testcase_10 | AC | 48 ms
49,336 KB |
testcase_11 | AC | 47 ms
49,892 KB |
testcase_12 | AC | 46 ms
47,628 KB |
testcase_13 | AC | 46 ms
49,504 KB |
testcase_14 | AC | 46 ms
49,480 KB |
testcase_15 | AC | 47 ms
49,424 KB |
testcase_16 | AC | 47 ms
49,836 KB |
testcase_17 | AC | 46 ms
49,484 KB |
testcase_18 | AC | 46 ms
49,540 KB |
testcase_19 | AC | 47 ms
49,604 KB |
testcase_20 | AC | 47 ms
50,128 KB |
testcase_21 | AC | 47 ms
49,780 KB |
testcase_22 | AC | 48 ms
49,544 KB |
testcase_23 | AC | 48 ms
49,572 KB |
testcase_24 | AC | 47 ms
49,424 KB |
testcase_25 | AC | 47 ms
50,164 KB |
testcase_26 | AC | 47 ms
50,016 KB |
testcase_27 | AC | 47 ms
49,436 KB |
testcase_28 | AC | 47 ms
49,408 KB |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in)); try { String line = stdReader.readLine(); String line2 = stdReader.readLine(); int max = -1; int count = 0; for(int i=0;i<line.length();i++){ if((""+line.charAt(i)).equals("o")){ count++; }else{ if(max<count)max = count; count = 0; } } for(int i=0;i<line2.length();i++){ if((""+line2.charAt(i)).equals("o")){ count++; }else{ if(max<count)max = count; count = 0; } } if(max<count)max = count; System.out.println(max); } catch (IOException e) { e.printStackTrace(); } } }