fn get_reciprocal(s: &str) -> String {
let mut tmp = String::new();
for ch in s.chars() {
if ch.is_ascii_uppercase() {
tmp.push((b'Z' - (ch as u8 - b'A')) as char);
} else if ch.is_ascii_lowercase() {
tmp.push((b'z' - (ch as u8 - b'a')) as char);
} else {
tmp.push(ch);
}
}
tmp
}
fn main() {
let s = "abc++def";
let s = get_reciprocal(s);
println!("{}", s);
}
/*
run:
zyx++wvu
*/