diff --git a/solutions/rust/src/bin/61A.rs b/solutions/rust/src/bin/61A.rs new file mode 100644 index 0000000..877f627 --- /dev/null +++ b/solutions/rust/src/bin/61A.rs @@ -0,0 +1,25 @@ +use std::io; + +fn main() { + let mut s = String::new(); + io::stdin().read_line(&mut s).unwrap(); + + let a: Vec = s.trim().chars().map(|d| d as u8).collect(); + + let mut s = String::new(); + io::stdin().read_line(&mut s).unwrap(); + + let b: Vec = 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); +}