結果

問題 No.418 ミンミンゼミ
ユーザー FVRChanFVRChan
提出日時 2017-10-03 09:20:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 379 bytes
コンパイル時間 3,791 ms
コンパイル使用メモリ 71,984 KB
実行使用メモリ 57,832 KB
最終ジャッジ日時 2023-09-23 02:00:14
合計ジャッジ時間 8,460 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,984 KB
testcase_01 AC 120 ms
55,492 KB
testcase_02 AC 123 ms
55,820 KB
testcase_03 AC 123 ms
55,800 KB
testcase_04 AC 124 ms
55,456 KB
testcase_05 AC 122 ms
55,712 KB
testcase_06 AC 120 ms
53,588 KB
testcase_07 AC 121 ms
55,936 KB
testcase_08 AC 122 ms
55,760 KB
testcase_09 AC 121 ms
55,656 KB
testcase_10 AC 123 ms
56,112 KB
testcase_11 AC 119 ms
55,848 KB
testcase_12 AC 120 ms
55,420 KB
testcase_13 AC 123 ms
56,088 KB
testcase_14 AC 121 ms
55,652 KB
testcase_15 AC 120 ms
55,904 KB
testcase_16 AC 121 ms
56,084 KB
testcase_17 AC 121 ms
55,876 KB
testcase_18 AC 122 ms
55,776 KB
testcase_19 AC 122 ms
56,380 KB
testcase_20 AC 120 ms
55,896 KB
testcase_21 AC 120 ms
55,660 KB
testcase_22 AC 122 ms
55,428 KB
testcase_23 AC 122 ms
56,240 KB
testcase_24 AC 123 ms
56,008 KB
testcase_25 AC 123 ms
57,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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);
	}
}
0