This page is still under construction.

Parts of this page are still being built. What you see may change.

Moving

Interview

Time limit2sMemory limit1024 MB

Summary
Given travel times X from A to B and Y from B to C, check whether X + Y fits within Z hours and 30 minutes.
Level

Easy1 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

Moving from point A to point B takes X hours, and moving from point B to point C takes Y hours.

When moving from point A to point C via point B, determine whether the trip can be completed within Z hours 30 minutes.

Input

The input is given from standard input in the following format.

X
Y
Z

Output

Print 1 if the trip can be completed within Z hours 30 minutes, and 0 otherwise.

Constraints

  • 1 ≦ X ≦ 100.
  • 1 ≦ Y ≦ 100.
  • 1 ≦ Z ≦ 100.
  • All input values are integers.

Examples2

  1. Example 1

    Input
    2
    3
    4
    
    Expected output
    0
    
  2. Example 2

    Input
    3
    4
    10
    
    Expected output
    1