結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
![]() |
提出日時 | 2016-06-05 17:42:57 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 133 ms / 1,000 ms |
コード長 | 530 bytes |
コンパイル時間 | 2,565 ms |
コンパイル使用メモリ | 74,592 KB |
実行使用メモリ | 54,364 KB |
最終ジャッジ日時 | 2024-11-18 09:44:37 |
合計ジャッジ時間 | 6,862 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner sc=new Scanner(System.in); while(sc.hasNext()){ char[] c=new char[14]; String str=sc.next(); for(int i=0;i<7;i++) c[i]=str.charAt(i); str=sc.next(); for(int i=0;i<7;i++) c[i+7]=str.charAt(i); int res=0; for(int i=0;i<c.length;i++){ if(c[i]=='o'){ int t=1; i++; while(i<c.length && c[i]=='o'){ t++; i++; } res=Math.max(res, t); } } System.out.println(res); } } }