結果

問題 No.224 文字列変更(easy)
コンテスト
ユーザー cra77756176
提出日時 2022-11-30 23:50:20
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 412 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 486 ms
コンパイル使用メモリ 195,256 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-04-24 07:24:20
合計ジャッジ時間 1,660 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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