結果

問題 No.418 ミンミンゼミ
ユーザー jimanojimano
提出日時 2018-01-13 22:21:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 51 ms / 1,000 ms
コード長 580 bytes
コンパイル時間 5,505 ms
コンパイル使用メモリ 72,068 KB
実行使用メモリ 50,136 KB
最終ジャッジ日時 2023-09-23 02:04:20
合計ジャッジ時間 6,852 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
47,784 KB
testcase_01 AC 49 ms
49,704 KB
testcase_02 AC 50 ms
49,496 KB
testcase_03 AC 48 ms
49,504 KB
testcase_04 AC 49 ms
49,944 KB
testcase_05 AC 48 ms
49,672 KB
testcase_06 AC 51 ms
49,764 KB
testcase_07 AC 50 ms
49,500 KB
testcase_08 AC 51 ms
49,792 KB
testcase_09 AC 49 ms
49,572 KB
testcase_10 AC 49 ms
49,720 KB
testcase_11 AC 49 ms
49,840 KB
testcase_12 AC 48 ms
47,672 KB
testcase_13 AC 49 ms
49,728 KB
testcase_14 AC 50 ms
49,692 KB
testcase_15 AC 50 ms
49,636 KB
testcase_16 AC 50 ms
49,716 KB
testcase_17 AC 50 ms
49,724 KB
testcase_18 AC 49 ms
49,888 KB
testcase_19 AC 48 ms
50,076 KB
testcase_20 AC 50 ms
49,840 KB
testcase_21 AC 50 ms
49,728 KB
testcase_22 AC 48 ms
50,136 KB
testcase_23 AC 49 ms
49,848 KB
testcase_24 AC 49 ms
49,780 KB
testcase_25 AC 49 ms
49,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * ミンミンゼミ
 */
public class No0418 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			Pattern p = Pattern.compile("(mi\\-*n)");
			Matcher m = p.matcher(br.readLine());
			String str = m.replaceAll("m");
			System.out.println(str.length());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0