結果
問題 | No.418 ミンミンゼミ |
ユーザー |
![]() |
提出日時 | 2017-10-03 09:20:04 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 125 ms / 1,000 ms |
コード長 | 379 bytes |
コンパイル時間 | 2,092 ms |
コンパイル使用メモリ | 74,648 KB |
実行使用メモリ | 54,400 KB |
最終ジャッジ日時 | 2024-07-16 02:27:48 |
合計ジャッジ時間 | 5,957 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
import java.util.Scanner;public class Main{private static Scanner sc=new Scanner(System.in);public static void main(String args[])throws Exception{String s=sc.nextLine();int counter=0;while(true){if(s.indexOf("mi") == -1 || s.indexOf("n") == -1){break;}else{s=s.substring(s.indexOf("n")+1);counter++;}}System.out.println(counter);}}