Day of week. Let’s count the days of the week as follows: 0 – Sunday, 1 – Monday, 2 – Tuesday, …, 6 – Saturday. Given an integer K in the range 1 to 365, find the number of the day of the week for the K-th day of the year provided that this year’s January 1 is Thursday.
Input |
Output |
1 |
4 |
2 |
5 |
3 |
6 |
4 |
0 |
5 |
1 |