結果

問題 No.418 ミンミンゼミ
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-05-03 17:00:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 41 ms / 1,000 ms
コード長 537 bytes
コンパイル時間 2,416 ms
コンパイル使用メモリ 71,832 KB
実行使用メモリ 49,896 KB
最終ジャッジ日時 2023-09-23 01:50:32
合計ジャッジ時間 3,921 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
49,620 KB
testcase_01 AC 41 ms
49,284 KB
testcase_02 AC 39 ms
49,460 KB
testcase_03 AC 40 ms
49,156 KB
testcase_04 AC 39 ms
49,252 KB
testcase_05 AC 39 ms
49,640 KB
testcase_06 AC 39 ms
49,332 KB
testcase_07 AC 39 ms
49,320 KB
testcase_08 AC 39 ms
49,300 KB
testcase_09 AC 39 ms
49,456 KB
testcase_10 AC 39 ms
49,896 KB
testcase_11 AC 39 ms
49,424 KB
testcase_12 AC 39 ms
49,204 KB
testcase_13 AC 39 ms
49,196 KB
testcase_14 AC 40 ms
49,356 KB
testcase_15 AC 40 ms
49,328 KB
testcase_16 AC 40 ms
49,252 KB
testcase_17 AC 40 ms
49,456 KB
testcase_18 AC 40 ms
49,188 KB
testcase_19 AC 40 ms
49,352 KB
testcase_20 AC 40 ms
49,316 KB
testcase_21 AC 39 ms
49,300 KB
testcase_22 AC 39 ms
49,152 KB
testcase_23 AC 40 ms
49,188 KB
testcase_24 AC 40 ms
49,172 KB
testcase_25 AC 40 ms
49,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import static java.lang.System.in;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        String S = reader.readLine();
        int counter = 0;
        for (int i = 1; i < S.length(); i++) {
            if (S.charAt(i) == 'n') {
                counter+=1;
            }
        }
        System.out.println(counter);
    }
}
0