結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
![]() |
提出日時 | 2015-12-15 15:32:48 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 62 ms / 1,000 ms |
コード長 | 592 bytes |
コンパイル時間 | 2,146 ms |
コンパイル使用メモリ | 75,204 KB |
実行使用メモリ | 50,568 KB |
最終ジャッジ日時 | 2024-11-18 09:36:45 |
合計ジャッジ時間 | 4,859 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
package yukicoder; import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader read = new BufferedReader(new InputStreamReader(System.in)); try { String line = read.readLine() + read.readLine(); int max = 0; int count = 0; for (int i = 0; i < line.length(); ++i) { if (line.charAt(i) == 'o') { ++count; if (max < count) { max = count; } } else { count = 0; } } System.out.println(max); } catch (Exception e) { e.printStackTrace(); } } }