Moving
InterviewTime limit2sMemory limit1024 MB
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.