solutions: 41A
This commit is contained in:
parent
9ebefaa2d1
commit
558f38fc27
1 changed files with 17 additions and 0 deletions
17
solutions/rust/src/bin/41A.rs
Normal file
17
solutions/rust/src/bin/41A.rs
Normal file
|
@ -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");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue