Problem:
Score : 100 points

Problem Statement

X and A are integers between 0 and 9 (inclusive).

If X is less than A, print 0; if X is not less than A, print 10.

Constraints

0 \leq X, A \leq 9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X A

Output

If X is less than A, print 0; if X is not less than A, print 10.

Sample Input 1

3 5

Sample Output 1

0

3 is less than 5, so we should print 0.

Sample Input 2

7 5

Sample Output 2

10

7 is not less than 5, so we should print 10.

Sample Input 3

6 6

Sample Output 3

10

6 is not less than 6, so we should print 10.

Solution in Rust (1.15.1) (judge verdict: Runtime Error)

use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
  let stdin = stdin();
  let stdin = stdin.lock();
  let token: String = stdin
    .bytes()
    .map(|c| c.expect("failed to read char") as char)
    .skip_while(|c| c.is_whitespace())
    .take_while(|c| !c.is_whitespace())
    .collect();
  token.parse().ok().expect("failed to parse token")
}

#[derive(Debug)]
struct Square {
  w: f64,
  h: f64,
}

impl Square {
  fn minus_height(&self, square: &Self) -> Self {
    Square {
      w: self.w,
      h: self.h - square.h,
    }
  }

  fn minus_width(&self, square: &Self) -> Self {
    Square {
      w: self.w - square.w,
      h: self.h,
    }
  }

  // 縦割り
  pub fn vertical_split(&self, x: f64) -> (Self, Self) {
    let left_side = Square { w: x, h: self.h };
    let right_side = self.minus_width(&left_side);
    (left_side, right_side)
  }

  // 横割り
  pub fn horizontal_split(&self, y: f64) -> (Self, Self) {
    let upper_side = Square { w: self.w, h: y };
    let bottom_side = self.minus_height(&upper_side);
    (upper_side, bottom_side)
  }

  // 面積計算
  fn area(&self) -> f64 {
    self.w * self.h
  }
}

fn min(a: f64, b: f64) -> f64 {
  if a < b {
    a
  } else {
    b
  }
}

fn max(a: f64, b: f64) -> f64 {
  if a < b {
    b
  } else {
    a
  }
}

fn main() {
  let w = read::<f64>();
  let h = read::<f64>();
  let x = read::<f64>();
  let y = read::<f64>();

  let square = Square { w: w, h: h };
  let (left, right) = square.vertical_split(x);
  let max_size_1 = max(left.area(), right.area());

  let (upper, bottom) = square.horizontal_split(y);
  let max_size_2 = max(upper.area(), bottom.area());

  print!("{:.6} ", min(max_size_1, max_size_2));

  match x * 2 as f64 == w && y * 2 as f64 == h {
    true => print!("1\n"),
    false => print!("0\n"),
  }
}