結果

問題 No.418 ミンミンゼミ
ユーザー fkwnw3_1243
提出日時 2017-05-03 17:00:47
言語 Java
(openjdk 23)
結果
AC  
実行時間 57 ms / 1,000 ms
コード長 537 bytes
コンパイル時間 2,130 ms
コンパイル使用メモリ 74,904 KB
実行使用メモリ 50,480 KB
最終ジャッジ日時 2024-07-16 02:20:22
合計ジャッジ時間 3,937 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

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