結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-28 23:31:42 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 625 bytes |
| コンパイル時間 | 2,431 ms |
| コンパイル使用メモリ | 75,548 KB |
| 実行使用メモリ | 37,300 KB |
| 最終ジャッジ日時 | 2024-10-04 17:26:28 |
| 合計ジャッジ時間 | 5,109 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 WA * 5 |
ソースコード
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;
public class Main {
public static void main(String[] args)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
String a = br.readLine()+ br.readLine();
int l = a.length();
int chain = 0;
int max = 0;
for(int i = 0; i < l; i++){
char c = a.charAt(i);
if(c=='o'){
chain++;
}else{
max = Math.max(max,chain);
chain = 0;
}
}
sb.append(max);
System.out.println(sb);
}
}