結果

問題 No.418 ミンミンゼミ
ユーザー yuma_shobon1108yuma_shobon1108
提出日時 2016-12-04 10:00:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 1,000 ms
コード長 338 bytes
コンパイル時間 2,101 ms
コンパイル使用メモリ 71,776 KB
実行使用メモリ 56,400 KB
最終ジャッジ日時 2023-09-23 01:43:19
合計ジャッジ時間 6,541 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,628 KB
testcase_01 AC 123 ms
55,820 KB
testcase_02 AC 125 ms
55,752 KB
testcase_03 AC 123 ms
56,092 KB
testcase_04 AC 123 ms
55,848 KB
testcase_05 AC 121 ms
55,916 KB
testcase_06 AC 121 ms
55,912 KB
testcase_07 AC 122 ms
55,684 KB
testcase_08 AC 123 ms
55,864 KB
testcase_09 AC 122 ms
55,960 KB
testcase_10 AC 126 ms
55,928 KB
testcase_11 AC 125 ms
55,668 KB
testcase_12 AC 121 ms
55,688 KB
testcase_13 AC 122 ms
55,732 KB
testcase_14 AC 121 ms
55,932 KB
testcase_15 AC 120 ms
55,784 KB
testcase_16 AC 121 ms
55,984 KB
testcase_17 AC 120 ms
55,732 KB
testcase_18 AC 126 ms
55,876 KB
testcase_19 AC 123 ms
55,888 KB
testcase_20 AC 121 ms
55,604 KB
testcase_21 AC 125 ms
55,948 KB
testcase_22 AC 124 ms
56,400 KB
testcase_23 AC 123 ms
55,664 KB
testcase_24 AC 126 ms
55,652 KB
testcase_25 AC 122 ms
55,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Question418
{
	public static void main(String[] str){
		
		Scanner scan = new Scanner(System.in);
		
		String s = scan.next();
		int cnt=0;
		
		s = s.replaceAll("-","");
		s = s.replaceAll("min","1");
		
		for(int i=0;i<s.length();i++){
			if(s.charAt(i)=='1')
				cnt++;
		}
		
		System.out.println(cnt);
	}
}
0