結果

問題 No.418 ミンミンゼミ
ユーザー cande398cande398
提出日時 2017-10-08 17:46:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 1,000 ms
コード長 352 bytes
コンパイル時間 2,797 ms
コンパイル使用メモリ 71,408 KB
実行使用メモリ 56,216 KB
最終ジャッジ日時 2023-09-23 02:00:59
合計ジャッジ時間 6,292 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,600 KB
testcase_01 AC 119 ms
55,468 KB
testcase_02 AC 118 ms
55,828 KB
testcase_03 AC 119 ms
55,624 KB
testcase_04 AC 117 ms
55,672 KB
testcase_05 AC 117 ms
55,580 KB
testcase_06 AC 116 ms
55,632 KB
testcase_07 AC 119 ms
55,844 KB
testcase_08 AC 119 ms
55,968 KB
testcase_09 AC 120 ms
55,668 KB
testcase_10 AC 119 ms
55,384 KB
testcase_11 AC 117 ms
55,892 KB
testcase_12 AC 118 ms
55,392 KB
testcase_13 AC 119 ms
56,000 KB
testcase_14 AC 118 ms
55,916 KB
testcase_15 AC 120 ms
55,628 KB
testcase_16 AC 119 ms
53,848 KB
testcase_17 AC 118 ms
55,620 KB
testcase_18 AC 118 ms
55,760 KB
testcase_19 AC 119 ms
55,896 KB
testcase_20 AC 119 ms
55,780 KB
testcase_21 AC 117 ms
55,504 KB
testcase_22 AC 120 ms
56,216 KB
testcase_23 AC 118 ms
55,564 KB
testcase_24 AC 120 ms
55,544 KB
testcase_25 AC 121 ms
55,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

public class Main{
  public static void main(String[] args){
    int i, count = 0;
    String input = new java.util.Scanner(System.in).next();
    if(input.charAt(input.length()-1) != 'n')count--;
    String[] line = input.split("n");
    for(i=0;i<line.length;i++){
      if(line[i].matches("mi-*"))count++;
    }
    System.out.println(count);
  }
}
0