#t203. 年龄问题

年龄问题

Age Problem

Problem Background

Special for beginners, ^_^

Problem Description

Xiaoming is aa years old this year, and his father is bb years old. Xiaoming wants to know after how many years his father's age will be twice his own. Can you help him?

Input Format

The input gives two int values aa and bb: Xiaoming's age and his father's age respectively.

Output Format

Output one integer nn: the number of years after which the father's age will be twice Xiaoming's.

Sample Input

3 30

Sample Output

24

Constraints

1s, 1024KiB for each test case.

Hint

  • "After n years the father's age is exactly twice Xiaoming's" — turn this sentence into an equation and solve for n.
  • One line of arithmetic gives the answer; no loop or branch is needed.
  • Verify with the sample: 3 30 → 24.