Saturday

AtCoder
IDabc267_a
Time2000ms
Memory256MB
Difficulty
One day, tired from going to school, Takahashi wanted to know how many days there were until Saturday. We know that the day was a weekday, and the name of the day of the week was $S$ in English. How many days were there until the first Saturday after that day (including Saturday but not the starting day)? ## Constraints * $S$ is `Monday`, `Tuesday`, `Wednesday`, `Thursday`, or `Friday`. ## Input Input is given from Standard Input in the following format: $S$ [samples]
Samples
Input #1
Wednesday
Output #1
3

It was Wednesday, so there were $3$ days until the first Saturday after that day.
Input #2
Monday
Output #2
5
API Response (JSON)
{
  "problem": {
    "name": "Saturday",
    "description": {
      "content": "One day, tired from going to school, Takahashi wanted to know how many days there were until Saturday.   We know that the day was a weekday, and the name of the day of the week was $S$ in English.   H",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc267_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "One day, tired from going to school, Takahashi wanted to know how many days there were until Saturday.  \nWe know that the day was a weekday, and the name of the day of the week was $S$ in English.  \nH...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments