#P5407. [THUPC 2019] 历史行程

[THUPC 2019] 历史行程

Description

Mother’s Day is a holiday celebrated to thank mothers, and its date differs in different parts of the world. On this day, mothers usually receive gifts from their children. In many people’s minds, carnations are considered one of the most suitable flowers to give to mothers.

In 1913, the U.S. Congress designated the second Sunday of May each year as the legal Mother’s Day, which is also the origin of modern Mother’s Day.

Given a year, output the date of Mother’s Day in that year. For convenience, you only need to output which day of May it is in that year.

Input Format

One line with one integer yy, representing the year.

It is guaranteed that 1913y20191913\leq y\leq 2019.

Output Format

One line with one integer, indicating which day of May Mother’s Day falls on in that year. (Please note: do not output extra leading zeros.)

2019
12

Hint

Sample Explanation

Mother’s Day in 2019 is May 12.

About the testdata

For some reasons, only 50 random test points were kept.

From THUPC (THU Programming Contest, Tsinghua University Programming Contest) 2019.

Resources such as editorials can be found at https://github.com/wangyurzee7/THUPC2019.

Translated by ChatGPT 5