diff --git a/solutions/rust/src/bin/41A.rs b/solutions/rust/src/bin/41A.rs new file mode 100644 index 0000000..631c5c7 --- /dev/null +++ b/solutions/rust/src/bin/41A.rs @@ -0,0 +1,17 @@ +use std::io; + +fn main() { + let mut s1 = String::new(); + io::stdin().read_line(&mut s1).unwrap(); + + let mut s2 = String::new(); + io::stdin().read_line(&mut s2).unwrap(); + + let rev: String = s1.trim().chars().rev().collect(); + + if s2.trim() == rev { + println!("YES"); + } else { + println!("NO"); + } +}