結果

問題 No.224 文字列変更(easy)
ユーザー cra77756176cra77756176
提出日時 2022-11-30 23:50:20
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 412 bytes
コンパイル時間 12,622 ms
コンパイル使用メモリ 390,264 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-07 19:28:49
合計ジャッジ時間 12,410 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::io::{self, Read};

fn main() {
    let mut input = String::new();
    io::stdin().read_to_string(&mut input).ok();
    let input = input
        .split_whitespace()
        .map(|s| s.chars().collect::<Vec<_>>())
        .collect::<Vec<_>>();

    let answer = input[1]
        .iter()
        .zip(input[2].iter())
        .filter(|&(c1, c2)| c1 != c2)
        .count();

    println!("{}", answer);
}
0