結果
| 問題 | No.224 文字列変更(easy) |
| コンテスト | |
| ユーザー |
nak3
|
| 提出日時 | 2017-11-03 15:14:47 |
| 言語 | Rust (1.97.1 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 0 ms / 5,000 ms |
| + 963µs | |
| コード長 | 799 bytes |
| 記録 | |
| コンパイル時間 | 3,281 ms |
| コンパイル使用メモリ | 181,840 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-16 06:51:51 |
| 合計ジャッジ時間 | 2,705 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
use std::io;
use std::str::FromStr;
fn main() {
let stdin = io::stdin();
let mut buf = String::new();
stdin.read_line(&mut buf).ok();
let mut it = buf.split_whitespace().map(|n| usize::from_str(n).unwrap());
let n = it.next().unwrap();
let mut buf = String::new();
stdin.read_line(&mut buf).ok();
let mut it = buf.split_whitespace().map(|n| String::from_str(n).unwrap());
let s = it.next().unwrap();
let mut buf = String::new();
stdin.read_line(&mut buf).ok();
let mut it = buf.split_whitespace().map(|n| String::from_str(n).unwrap());
let t = it.next().unwrap();
let mut ans = 0;
for i in 0..n {
if s.chars().nth(i).unwrap() != t.chars().nth(i).unwrap() {
ans += 1;
}
}
println!("{}", ans);
}
nak3