Problem list
Log in
#r03570 · CCC 2021 Junior

Boiling Water

Bronze IV 2.0 s 256 MB

At sea level, atmospheric pressure is 100 kPa and water begins to boil at 100°C. As you go above sea level, atmospheric pressure decreases, and water boils at lower temperatures. As you go below sea level, atmospheric pressure increases, and water boils at higher temperatures. A formula relating atmospheric pressure to the temperature at which water begins to boil is $$P = 5 \times B - 400$$ where $P$ is atmospheric pressure measured in kPa, and $B$ is the temperature at which water begins to boil measured in °C.

Given the temperature at which water begins to boil, determine atmospheric pressure. Also determine if you are below sea level, at sea level, or above sea level.

Note that the science of this problem is generally correct but the values of 100°C and 100 kPa are approximate and the formula is a simplification of the exact relationship between water’s boiling point and atmospheric pressure.

Input

The input is one line containing an integer $B$ where $B \geq 80$ and $B \leq 200$. This represents the temperature in °C at which water begins to boil.

Output

The output is two lines. The first line must contain an integer which is atmospheric pressure measured in kPa. The second line must contain the integer -1, 0, or 1. This integer represents whether you are below sea level, at sea level, or above sea level, respectively.

Constraints

$B \geq 80$ $B \leq 200$

Example 1

Input
99
Output
95
1

When $B=99$, we can substitute into the formula and get $P= 5 \times 99 - 400$ which equals $95$. Since 95 kPa is less than 100 kPa, you are above sea level.

Example 2

Input
102
Output
100
 -1

When $B=102$, we can substitute into the formula and get $P=5 \times 102 - 400$ which equals $110$. Since 110 kPa is greater than 100 kPa, you are below sea level.

Source
CCC 2021 Junior
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