結果
| 問題 |
No.418 ミンミンゼミ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-17 15:31:49 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 542 bytes |
| コンパイル時間 | 2,634 ms |
| コンパイル使用メモリ | 75,120 KB |
| 実行使用メモリ | 56,172 KB |
| 最終ジャッジ日時 | 2024-11-17 21:54:40 |
| 合計ジャッジ時間 | 6,092 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 25 |
ソースコード
import java.util.Scanner;
import java.util.regex.Matcher;
public class Minmin {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
String S = stdIn.nextLine();
int counter = 0;
while (S.indexOf("mi") == 0) {
S = S.substring(2);
while (S.charAt(0) == '-') {
S = S.substring(1);
}
if (S.charAt(0) == 'n') {
counter++;
}
}
System.out.println(counter);
}
}