結果

問題 No.418 ミンミンゼミ
ユーザー kenji_shioyakenji_shioya
提出日時 2016-09-22 21:26:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 1,000 ms
コード長 387 bytes
コンパイル時間 3,356 ms
コンパイル使用メモリ 72,580 KB
実行使用メモリ 56,308 KB
最終ジャッジ日時 2023-09-23 01:01:10
合計ジャッジ時間 7,792 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,236 KB
testcase_01 AC 120 ms
56,016 KB
testcase_02 AC 119 ms
56,276 KB
testcase_03 AC 118 ms
55,784 KB
testcase_04 AC 118 ms
56,100 KB
testcase_05 AC 118 ms
56,044 KB
testcase_06 AC 118 ms
55,800 KB
testcase_07 AC 116 ms
55,636 KB
testcase_08 AC 117 ms
55,864 KB
testcase_09 AC 116 ms
56,228 KB
testcase_10 AC 119 ms
56,020 KB
testcase_11 AC 117 ms
56,048 KB
testcase_12 AC 113 ms
55,612 KB
testcase_13 AC 116 ms
56,280 KB
testcase_14 AC 119 ms
55,680 KB
testcase_15 AC 116 ms
55,916 KB
testcase_16 AC 117 ms
55,800 KB
testcase_17 AC 119 ms
55,792 KB
testcase_18 AC 116 ms
56,308 KB
testcase_19 AC 117 ms
56,236 KB
testcase_20 AC 117 ms
56,068 KB
testcase_21 AC 116 ms
55,600 KB
testcase_22 AC 116 ms
56,256 KB
testcase_23 AC 118 ms
55,672 KB
testcase_24 AC 120 ms
55,520 KB
testcase_25 AC 118 ms
55,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise153 {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int count = 0;

    String str = sc.next();
    str = str.replace("-", "");

    String[] strarray = str.split("m");

    for(String letter: strarray){
      if(letter.equals("in")){
        count++;
      }
    }
     System.out.println(count);
  }
}
0