solutions: 61A
This commit is contained in:
parent
08efdec05f
commit
5b99663d99
1 changed files with 25 additions and 0 deletions
25
solutions/rust/src/bin/61A.rs
Normal file
25
solutions/rust/src/bin/61A.rs
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
use std::io;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let mut s = String::new();
|
||||||
|
io::stdin().read_line(&mut s).unwrap();
|
||||||
|
|
||||||
|
let a: Vec<u8> = s.trim().chars().map(|d| d as u8).collect();
|
||||||
|
|
||||||
|
let mut s = String::new();
|
||||||
|
io::stdin().read_line(&mut s).unwrap();
|
||||||
|
|
||||||
|
let b: Vec<u8> = s.trim().chars().map(|d| d as u8).collect();
|
||||||
|
|
||||||
|
let mut s = String::new();
|
||||||
|
|
||||||
|
for i in 0..a.len() {
|
||||||
|
if a[i] != b[i] {
|
||||||
|
s.push_str("1");
|
||||||
|
} else {
|
||||||
|
s.push_str("0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
println!("{}", s);
|
||||||
|
}
|
Loading…
Reference in a new issue