結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
![]() |
提出日時 | 2016-01-26 00:09:53 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 59 ms / 1,000 ms |
コード長 | 939 bytes |
コンパイル時間 | 2,116 ms |
コンパイル使用メモリ | 76,320 KB |
実行使用メモリ | 50,580 KB |
最終ジャッジ日時 | 2024-11-18 09:39:30 |
合計ジャッジ時間 | 4,599 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
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(); } } }