結果

問題 No.418 ミンミンゼミ
ユーザー Michae'Gon
提出日時 2017-02-21 01:52:56
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 353 bytes
コンパイル時間 14,093 ms
コンパイル使用メモリ 398,888 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-16 02:17:46
合計ジャッジ時間 15,675 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

fn get_line() -> String {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().to_string()
}

fn main() {
    println!("{}",
        get_line().as_bytes().iter().fold(0, |acc, &x|
            if x == b'n' {
                acc + 1
            }
            else {
                acc
            }
        )
    );
}
0