結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー | kuramu |
提出日時 | 2016-01-26 00:09:53 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 58 ms / 1,000 ms |
コード長 | 939 bytes |
コンパイル時間 | 2,132 ms |
コンパイル使用メモリ | 75,732 KB |
実行使用メモリ | 50,412 KB |
最終ジャッジ日時 | 2024-04-29 08:02:24 |
合計ジャッジ時間 | 4,673 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 58 ms
50,412 KB |
testcase_01 | AC | 58 ms
50,360 KB |
testcase_02 | AC | 57 ms
50,144 KB |
testcase_03 | AC | 55 ms
37,084 KB |
testcase_04 | AC | 55 ms
36,780 KB |
testcase_05 | AC | 55 ms
37,096 KB |
testcase_06 | AC | 53 ms
37,164 KB |
testcase_07 | AC | 55 ms
36,972 KB |
testcase_08 | AC | 54 ms
36,876 KB |
testcase_09 | AC | 55 ms
37,096 KB |
testcase_10 | AC | 56 ms
36,992 KB |
testcase_11 | AC | 54 ms
37,064 KB |
testcase_12 | AC | 55 ms
37,032 KB |
testcase_13 | AC | 55 ms
37,144 KB |
testcase_14 | AC | 54 ms
37,076 KB |
testcase_15 | AC | 55 ms
37,304 KB |
testcase_16 | AC | 56 ms
36,684 KB |
testcase_17 | AC | 56 ms
37,276 KB |
testcase_18 | AC | 56 ms
37,200 KB |
testcase_19 | AC | 55 ms
37,164 KB |
testcase_20 | AC | 56 ms
36,888 KB |
testcase_21 | AC | 56 ms
37,008 KB |
testcase_22 | AC | 55 ms
36,792 KB |
testcase_23 | AC | 56 ms
36,792 KB |
testcase_24 | AC | 56 ms
37,084 KB |
testcase_25 | AC | 55 ms
37,304 KB |
testcase_26 | AC | 54 ms
37,088 KB |
testcase_27 | AC | 56 ms
37,300 KB |
testcase_28 | AC | 56 ms
37,132 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(); } } }