結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
![]() |
提出日時 | 2016-11-28 15:21:59 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 132 ms / 1,000 ms |
コード長 | 602 bytes |
コンパイル時間 | 2,042 ms |
コンパイル使用メモリ | 75,192 KB |
実行使用メモリ | 41,532 KB |
最終ジャッジ日時 | 2024-11-18 09:56:26 |
合計ジャッジ時間 | 6,659 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int cnt1 = 0; int ans = 0; int f=0; for(int i=0;i<2;i++){ String s1 = sc.next(); char[] c1 = s1.toCharArray(); for(int k=0;k<s1.length();k++){ if(c1[k]=='o') { f++; ans = Math.max( ans , f ); }else{ f=0; } } } System.out.print(ans); System.out.println(); } }