結果

問題 No.418 ミンミンゼミ
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-13 12:19:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 1,000 ms
コード長 343 bytes
コンパイル時間 1,760 ms
コンパイル使用メモリ 71,408 KB
実行使用メモリ 57,652 KB
最終ジャッジ日時 2023-09-23 02:01:17
合計ジャッジ時間 5,817 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
56,052 KB
testcase_01 AC 113 ms
56,172 KB
testcase_02 AC 112 ms
56,120 KB
testcase_03 AC 112 ms
55,904 KB
testcase_04 AC 112 ms
55,928 KB
testcase_05 AC 112 ms
55,724 KB
testcase_06 AC 112 ms
55,808 KB
testcase_07 AC 112 ms
55,588 KB
testcase_08 AC 113 ms
55,528 KB
testcase_09 AC 114 ms
57,652 KB
testcase_10 AC 114 ms
56,216 KB
testcase_11 AC 113 ms
56,020 KB
testcase_12 AC 112 ms
55,908 KB
testcase_13 AC 112 ms
55,912 KB
testcase_14 AC 113 ms
56,408 KB
testcase_15 AC 111 ms
55,688 KB
testcase_16 AC 112 ms
55,872 KB
testcase_17 AC 111 ms
55,584 KB
testcase_18 AC 112 ms
55,896 KB
testcase_19 AC 113 ms
55,836 KB
testcase_20 AC 112 ms
55,712 KB
testcase_21 AC 111 ms
55,916 KB
testcase_22 AC 114 ms
55,644 KB
testcase_23 AC 112 ms
56,168 KB
testcase_24 AC 112 ms
55,980 KB
testcase_25 AC 116 ms
56,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		s = s.replaceAll("-", "");
		int ans = 0;
		for(int i = 0 ; i < s.length() - 2 ; i += 3) {
			if(s.substring(i, i + 3).equals("min")) {
				ans++;
			}
		}
		System.out.println(ans);
	}
}
0