Deadline
Limits: 2 sec., 256 MiB
This statement was translated automatically from Ukrainian.
One day, Petryk thought that he had never set deadlines for his tasks. No time limits, and it’s always like that! "I’ll set a deadline for myself. Finally, I will plan every day to meet the scheduled limit," — Petryk thought. Petryk is starting his next task with a deadline today.
It is known that today is the day of the week \(d\), and the deadline will arrive in \(n\) days. Help Petryk, calculate the count of each day of the week for the next \(n\) days, starting from today.
Input
The first line contains the name of today’s day of the week \(d\).
The second line contains an integer \(n\).
Output
In a single line, print 7 numbers — the counts of each day of the week.
The first number is the number of Mondays, the second is the number of Tuesdays, and so on.
Constraints
The day \(d\) is given as a string
Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday, or
Sunday.
40% of tests: \(1 \le n \le 10^5\),
60% of tests: \(10^5 < n \le 10^9\).
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| Thursday 9 | 1 1 1 2 2 1 1 |
Submit a solution
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|