Problem list
Log in
#r03116 · Online Judge > GoldOJ

Air Conditioner Remote

Silver IV 2.0 s 256 MB

A remote has buttons changing the temperature by $\pm 1$, $\pm 5$, and $\pm 10$ degrees. Given the current temperature $a$ and target $b$, print the minimum number of button presses to go from $a$ to $b$.

Input

One line: two integers $a$ and $b$.

Output

Print the minimum number of presses.

Example 1

Input
7 34
Output
5
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code