結果

問題 No.418 ミンミンゼミ
ユーザー tentententen
提出日時 2020-11-11 17:20:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 1,000 ms
コード長 322 bytes
コンパイル時間 2,196 ms
コンパイル使用メモリ 71,368 KB
実行使用メモリ 56,488 KB
最終ジャッジ日時 2023-09-30 00:35:24
合計ジャッジ時間 6,468 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
55,724 KB
testcase_01 AC 116 ms
55,920 KB
testcase_02 AC 113 ms
55,692 KB
testcase_03 AC 113 ms
55,892 KB
testcase_04 AC 113 ms
55,756 KB
testcase_05 AC 113 ms
55,436 KB
testcase_06 AC 113 ms
55,736 KB
testcase_07 AC 112 ms
56,088 KB
testcase_08 AC 115 ms
55,692 KB
testcase_09 AC 113 ms
56,040 KB
testcase_10 AC 113 ms
56,488 KB
testcase_11 AC 113 ms
55,856 KB
testcase_12 AC 113 ms
55,688 KB
testcase_13 AC 113 ms
56,024 KB
testcase_14 AC 113 ms
55,704 KB
testcase_15 AC 119 ms
55,692 KB
testcase_16 AC 119 ms
55,740 KB
testcase_17 AC 115 ms
55,408 KB
testcase_18 AC 113 ms
55,760 KB
testcase_19 AC 113 ms
55,676 KB
testcase_20 AC 112 ms
56,056 KB
testcase_21 AC 112 ms
55,700 KB
testcase_22 AC 113 ms
56,172 KB
testcase_23 AC 114 ms
55,844 KB
testcase_24 AC 124 ms
55,340 KB
testcase_25 AC 113 ms
55,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        for (char c : sc.next().toCharArray()) {
            if (c == 'n') {
                count++;
            }
        }
        System.out.println(count);
    }
}
0