P5407 [THUPC 2019] Historical Journey
Background
> What is life like? How do we live?
>
> No matter who it is, everyone is born from darkness and will eventually return to darkness. A few years, a few decades—short yet long. All kinds of people, all kinds of things, like clouds passing before your eyes, vanish in an instant. The flowers you once saw will wither in the end. Some things may still linger in your memory, but even more have long become impossible to find.
>
> But there is one person you will not forget.
>
> When you were born into the darkness, that person was always by your side. When you broke through the darkness and first saw the light of the world, that person was also by your side.
>
> The first cry, the first words, the first steps, the first run.
>
> Every time you grow, it is a leap for yourself. But for that person, it is the purest joy and emotion.
>
> When you do not know, in places you do not know, that person gives everything they have to create the best for you, to protect everything about you, and to point out a bridge leading you to the future.
>
> That person hopes every day, hoping that you can grow up sooner and become strong enough to protect yourself.
>
> That person worries every day, worrying that the day you part from that person will finally come.
>
> You will keep growing, and you will have the ability to stand on your own. And that person can no longer protect you like before.
>
> One day, you will walk toward a broader future. You will have everything completely different from before. And that person can no longer protect you.
>
> And the time you and that person can have together is getting shorter and shorter.
>
> Five years, ten years, twenty years—you grow up day by day.
>
> Five years, ten years, twenty years—that person grows old day by day.
>
> That person can no longer protect you, so now it is your turn to protect that person.
>
> Maybe that person cannot stay by your side forever. Maybe that person will eventually leave you.
>
> But you will never forget that person, because that person has always been by your side.
>
> Today is that person’s holiday.
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 $y$, representing the year.
It is guaranteed that $1913\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.)
Explanation/Hint
### Sample Explanation
Mother’s Day in 2019 is May 12.
### About the testdata
For some reasons, only 50 random test points were kept.
### Copyright Information
From THUPC (THU Programming Contest, Tsinghua University Programming Contest) 2019.
Resources such as editorials can be found at .
Translated by ChatGPT 5