Question: using python In AtCoder Kingdom, Gregorian calendar is used, and dates are written in the year-month-day order, or the month-day order without the year. For
In AtCoder Kingdom, Gregorian calendar is used, and dates are written in the "year-month-day" order, or the "month-day" order without the year. For example, May 3, 2018 is written as 201853, or 53 without the year. In this country, a date is called Takahashi when the month and the day are equal as numbers. For example, 55 is Takahashi. How many days from 2018-1-1 through 2018- ab are Takahashi? Constraints - a is an integer between 1 and 12 (inclusive). - b is an integer between 1 and 31 (inclusive). - 2018-a-b is a valid date in Gregorian calendar. Input Input is given from Standard Input in the following format: Output Print the number of days from 2018-1-1 through 2018-a-b that are Takahashi. There are five days that are Takahashi: 11,22,33,44 and 5-5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
