結果

問題 No.224 文字列変更(easy)
コンテスト
ユーザー cra77756176
提出日時 2022-11-30 23:50:20
言語 Rust
(1.97.1 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 0 ms / 5,000 ms
+ 865µs
コード長 412 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 668 ms
コンパイル使用メモリ 178,284 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2026-09-11 16:28:23
合計ジャッジ時間 2,282 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_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