101460: [AtCoder]ABC146 A - Can't Wait for Holiday

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $100$ points

Problem Statement

Given is a string $S$ representing the day of the week today.

$S$ is SUN, MON, TUE, WED, THU, FRI, or SAT, for Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday, respectively.

After how many days is the next Sunday (tomorrow or later)?

Constraints

  • $S$ is SUN, MON, TUE, WED, THU, FRI, or SAT.

Input

Input is given from Standard Input in the following format:

$S$

Output

Print the number of days before the next Sunday.


Sample Input 1

SAT

Sample Output 1

1

It is Saturday today, and tomorrow will be Sunday.


Sample Input 2

SUN

Sample Output 2

7

It is Sunday today, and seven days later, it will be Sunday again.

Input

题意翻译

### 题目描述 给你一个字符串 $ S $ 请求出还有多久到假日。 $ S $ 可以是 `SUN`,`MON`,`TUE`,`WED`,`THU`,`FRI`,`SAT`它们分别表示:日曜日、月曜日、火曜日、水曜日、木曜日、金曜日、土曜日。 (日曜日是假日)。 ### 输入格式 按以下格式输入。 > $ S $ ### 输出格式 还有多久到假日。 ### 样例输入 #1 ``` SAT ``` ### 样例输出 #1 ``` 1 ``` ### 样例输入 #2 ``` SUN ``` ### 样例输出 #2 ``` 7 ``` ### 提示 - $ S $ 保证是 `SUN`,`MON`,`TUE`,`WED`,`THU`,`FRI`,`SAT` 其中之一。 ### 样例说明 1 今天是土曜日,距离日曜日还有 $ 1 $ 天。 ### 样例说明 2 今天是日曜日,距离下一个日曜日还有 $ 7 $ 天。

加入题单

算法标签: