November (11月)
Time limit2sMemory limit1024 MB
Given day A of November 2022 and a number of weeks B, print 1 if the day B weeks later is still in November, otherwise 0.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
Two integers A and B are given.
Output 1 if the day that is B weeks after day A of November 2022 falls in November 2022, and 0 otherwise.
November 2022 has 30 days, from November 1 to November 30, 2022. The day x weeks later is the day (7 × x) days later.
Input
The input is given in the following format.
A
B
Output
Output 1 if the day that is B weeks after day A of November 2022 falls in November 2022, and 0 otherwise.
Constraints
1 ≦ A ≦ 30.1 ≦ B ≦ 5.- All input values are integers.