Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::io;
- fn gets() -> String {
- let mut buf = String::new();
- io::stdin().read_line(&mut buf).ok();
- return buf
- }
- fn main() {
- let line = gets();
- let mut it = line.split_whitespace().map(|n| n.parse::<i64>().unwrap());
- let x = it.next().unwrap();
- let a = it.next().unwrap();
- let b = it.next().unwrap();
- if (x - a).abs() < (x - b).abs() {
- println!("A");
- } else {
- println!("B");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement