結果
| 問題 | No.203 ゴールデン・ウィーク(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-14 22:19:33 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 122 ms / 1,000 ms |
| コード長 | 583 bytes |
| 記録 | |
| コンパイル時間 | 2,218 ms |
| コンパイル使用メモリ | 76,584 KB |
| 実行使用メモリ | 54,276 KB |
| 最終ジャッジ日時 | 2024-11-18 10:24:19 |
| 合計ジャッジ時間 | 6,218 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
int weekday = 0;
String days = in.nextLine();
days += in.nextLine();
for(int i=0, current=0; i<days.length(); i++){
if(days.charAt(i) == 'o'){
current++;
} else {
current = 0;
}
if(weekday < current){
weekday = current;
}
}
System.out.println(weekday);
}
}