Problem:


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.



Sample input:
SAT


Sample output:
1

Submission status: Accepted

Solution code:
s = input()
arr =  ["SUN","MON","TUE","WED","THU","FRI","SAT","SUN"]

for i,t in enumerate(arr):
  if s == t:
    print((7-i))
    break

Submission status: Accepted

Solution code:
day = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
s = input()
index = day.index(s)
print(7 - index)

Submission status: Accepted

Solution code:
s = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
c = input()
today = 0
while True:
    if s[today]==c:
        break
    today+=1
print(7-today)

Submission status: Accepted

Solution code:
S = input()

nextSunday = {'SUN':7, 'MON':6, 'TUE':5, 'WED':4, 'THU':3, 'FRI':2, 'SAT':1}

print(nextSunday[S])

Submission status: Accepted

Solution code:
import sys

S = input()

lst = ['SUN','MON','TUE','WED','THU','FRI','SAT']

num = lst.index(S)
print(7 - num)

Submission status: Accepted

Solution code:
S = input()
ans = 0

if S == 'SUN':
    ans = 7
elif S == 'MON':
    ans = 6
elif S == 'TUE':
    ans = 5
elif S == 'WED':
    ans = 4
elif S == 'THU':
    ans = 3
elif S == 'FRI':
    ans = 2
elif S == 'SAT':
    ans = 1

print(ans)

Submission status: Accepted

Solution code:
def num():
    return int(input())

def nums():
    return list(map(int,input().split(" ")))

#A
date = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(date[input()])

Submission status: Accepted

Solution code:
a = {'SUN':0, 'MON':1, 'TUE':2, 'WED':3, 'THU':4, 'FRI':5, 'SAT':6}
S = input()
print(7 - a[S])

Submission status: Accepted

Solution code:
day = input()
if day == 'SUN':
  day = 0
elif day == 'MON':
  day = 1
elif day == 'TUE':
  day = 2
elif day == 'WED':
  day = 3
elif day == 'THU':
  day = 4
elif day == 'FRI':
  day = 5
elif day == 'SAT':
  day = 6
print(7 - day)

Submission status: Accepted

Solution code:
S = str(input())
if S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)

Submission status: Accepted

Solution code:
str = [input() for i in range(1)]

if str[0] == "SUN":
    print(7)
if str[0] == "MON":
    print(6)
if str[0] == "TUE":
    print(5)
if str[0] == "WED":
    print(4)
if str[0] == "THU":
    print(3)
if str[0] == "FRI":
    print(2)
if str[0] == "SAT":
    print(1)

Submission status: Accepted

Solution code:
S = input()

youbi = ["SAT","FRI","THU","WED","TUE","MON", "SUN"]
print(youbi.index(S) + 1)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

s=input()

if(s=='MON'):
    print(6)
elif(s=='TUE'):
    print(5)
elif(s=='WED'):
    print(4)
elif(s=='THU'):
    print(3)
elif(s=='FRI'):
    print(2)
elif(s=='SAT'):
    print(1)
elif(s=='SUN'):
    print(7)

Submission status: Accepted

Solution code:
a = input()

if a == 'SUN':
  print(7)
elif a == 'MON':
  print(6)
elif a == 'TUE':
  print(5)
elif a == 'WED':
  print(4)
elif a == 'THU':
  print(3)
elif a == 'FRI':
  print(2)
elif a == 'SAT':
  print(1)

Submission status: Accepted

Solution code:
S = str(input())

date = ['SUN','MON','TUE','WED','THU','FRI','SAT']
date_idx = date.index(S)
print(7 - date_idx)

Submission status: Accepted

Solution code:
s = str(input())
s_dict = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
print(s_dict.get(s))

Submission status: Accepted

Solution code:
day = input()

daylist = ['SUN','MON','TUE','WED','THU','FRI','SAT']

for i, list in enumerate(daylist):
    if list == day and list == 'SUN':
        print(7)
    elif list == day:
        print(7-i)

Submission status: Accepted

Solution code:
S = input()
L = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7-L.index(S))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

S = input()

day = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7 - day.index(S) % 7)

Submission status: Accepted

Solution code:
S = input()
L = ['SUN','MON','TUE','WED','THU','FRI','SAT']

for i, s in enumerate(L):
    if s == S:
        if s == 'SUN':
            print(7)
        else:
            print(7 - i)

Submission status: Accepted

Solution code:
S = input()

if S == "SUN":
    print(7)
if S == "MON":
    print(6)
if S == "TUE":
    print(5)
if S == "WED":
    print(4)
if S == "THU":
    print(3)
if S == "FRI":
    print(2)
if S == "SAT":
    print(1)

Submission status: Accepted

Solution code:
l = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

s = input()

a = l.index(s)
print(7-a)

Submission status: Accepted

Solution code:
days = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
today = str(input())

if today in days:
    todayNum = days.index(today)
    remainder = 7 - todayNum
    print(remainder)

Submission status: Accepted

Solution code:
s=input()
a=["SUN", "MON", "TUE", "WED", "THU", "FRI","SAT"]
b = a.index(s);
if(b==0):
  print(7)
else:
  print(7-b)

Submission status: Accepted

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from itertools import permutations, combinations,combinations_with_replacement,product
from fractions import Fraction as frac
import bisect
import heapq

import logging
logging.basicConfig(level=logging.DEBUG)

import sys
#input = sys.stdin.readline().rstrip

setrecursionlimit(1000000)

MOD = 10**9+7
INF = float('inf')

def main():
    S=input()
    A=['SUN','MON','TUE','WED','THU','FRI','SAT','SUN' ]

    print(7-A.index(S))
main()

Submission status: Accepted

Solution code:

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())


TT = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

S = input()

print(7-TT.index(S))

Submission status: Accepted

Solution code:
l=['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT','SUN']
s=input()
for i in range(7):
    if s==l[i]:
        if i==6:
            print(7)
            break
        print(6-i)

Submission status: Accepted

Solution code:
a = ["SUN", "MON" , "TUE", "WED", "THU", "FRI", "SAT"]

s = input()

for i in range(7):
    if s == a[i]:
        print(7-i)

Submission status: Accepted

Solution code:
if __name__ == "__main__":
	S = input()
	W = ['SUN','MON','TUE','WED','THU','FRI','SAT']

	pre_ans = int(W.index(S))
	print(7-pre_ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()
# template


def main():
    S = input().rstrip()
    if S == "SAT":
        print(1)
    elif S == "MON":
        print(6)
    elif S == "TUE":
        print(5)
    elif S == "WED":
        print(4)
    elif S == "THU":
        print(3)
    elif S == "FRI":
        print(2)
    elif S == "SUN":
        print(7)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()

if S == "SUN":
    print("7")

elif S == "MON":
    print("6")

elif S == "TUE":
    print("5")

elif S == "WED":
    print("4")

elif S == "THU":
    print("3")

elif S == "FRI":
    print("2")

else:
    print("1")

Submission status: Accepted

Solution code:
N = input()
nan = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
print(nan[N])

Submission status: Accepted

Solution code:
def main():
	a = {"SUN" : 0,
	"SAT" : 6,
	"FRI" : 5,
	"THU" : 4, 
	"WED" : 3,
	"TUE" : 2,
	"MON" : 1}
	s = input()
	print(7-a[s.strip()])
	
main()

Submission status: Accepted

Solution code:
S=input()
w_dict = {'SUN':0,'MON':1,'TUE':2,'WED':3,'THU':4,'FRI':5,'SAT':6}
print(7 - w_dict[S])

Submission status: Accepted

Solution code:
s = input()

if s == "SUN": print(7)
if s == "MON": print(6)
if s == "TUE": print(5)
if s == "WED": print(4)
if s == "THU": print(3)
if s == "FRI": print(2)
if s == "SAT": print(1)

Submission status: Accepted

Solution code:
day_list=["SAT","FRI","THU","WED","TUE","MON","SUN"]
S=input()
day=day_list.index(S)+1
print(day)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = read().rstrip().decode('utf-8')

D = 'SUN,MON,TUE,WED,THU,FRI,SAT'.split(',')

dic = {x:7 - i%7 for i,x in enumerate(D)}

answer = dic[S]
print(answer)

Submission status: Accepted

Solution code:
S = input()
lst = {"MON":0,"TUE":1,"WED":2,"THU":3,"FRI":4,"SAT":5,"SUN":6}

ans = lst[S]
if ans == 6:
    print(7)
else:
    print(7-ans-1)

Submission status: Accepted

Solution code:
import sys
s = sys.stdin.readline().rstrip()
L = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI' ,'SAT']

for idx, w in enumerate(L):
    if s ==w:
        print(7-idx)

Submission status: Accepted

Solution code:
my_map = {
    "SUN": 7,
    "MON": 6,
    "TUE": 5,
    "WED": 4,
    "THU": 3,
    "FRI": 2,
    "SAT": 1,
}
s = input()
print(my_map[s])

Submission status: Accepted

Solution code:
S = input()
weeks = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1}

if S in weeks:
    print(weeks[S])

Submission status: Accepted

Solution code:
S = input()

day = ['SUN','MON','TUE','WED','THU','FRI','SAT']
ss = 0
for i in range(7):
    if S==day[i]:
        ss = abs(7-i)

print(ss)

Submission status: Accepted

Solution code:

s=input()
if s=="SUN":
    print(7)
elif s=="MON":
    print(6)
elif s=="TUE":
    print(5)
elif s=="WED":
    print(4)
elif s=="THU":
    print(3)
elif s=="FRI":
    print(2)
else:
    print(1)

Submission status: Accepted

Solution code:
s = input()

if s == 'SUN':
  print("7")
  exit()
if s == 'MON':
  print("6")
  exit()
if s == 'TUE':
  print("5")
  exit()
if s == 'WED':
  print("4")
  exit()
if s == 'THU':
  print("3")
  exit()
if s == 'FRI':
  print("2")
if s == 'SAT':
  print("1")

Submission status: Accepted

Solution code:
inputs = input()
num = 0
if inputs == "SUN":
    num = 7
elif inputs == "MON":
    num = 6
elif inputs == "TUE":
    num = 5
elif inputs == "WED":
    num = 4
elif inputs == "THU":
    num = 3
elif inputs == "FRI":
    num = 2
elif inputs == "SAT":
    num = 1

print(num)

Submission status: Accepted

Solution code:
s = input()
 
all_ = ['SUN','MON','TUE','WED','THU','FRI','SAT']
 
 
for i in range(7):
    if all_[i] == s:
        break
        
print(7-i)

Submission status: Accepted

Solution code:
names = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
s = input().strip()
for j,name in enumerate(names):
  if s == name:
    print(7-j)

Submission status: Accepted

Solution code:
import sys
S = input()
a_list =["MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"]
count = 0
m = 0
if S == "SUN":
    print(7)
    sys.exit(0)
for i in a_list:
    if m == 1:
        count += 1
    if S == i:
        m += 1
print(count)

Submission status: Accepted

Solution code:
S = input()

if S == "SAT":
    print(1)
elif S == "FRI":
    print(2)
elif S == "THU":
    print(3)
elif S == "WED":
    print(4)
elif S == "TUE":
    print(5)
elif S == "MON":
    print(6)
else:
    print(7)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import sys

def _s(): return sys.stdin.readline().strip()

m = {
    "MON":6,
    "TUE":5,
    "WED":4,
    "THU":3,
    "FRI":2,
    "SAT":1,
    "SUN":7
}
s = _s()
print(m[s])

Submission status: Accepted

Solution code:
S=input()
if S =="SUN":
  print(7)
if S=="MON":
  print(6)
if S=="TUE":
  print(5)
if S=="WED":
  print(4)
if S=="THU":
  print(3)
if S=="FRI":
  print(2)
if S=="SAT":
  print(1)

Submission status: Accepted

Solution code:
s = input()

days = ["SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"]

for x in days:
    if(s == x):
        print(days.index(x)+1)

Submission status: Accepted

Solution code:
S = input()

if S =="SUN":
  print(7)
elif S =="MON":
  print(6)
elif S =="TUE":
  print(5)
elif S =="WED":
  print(4)
elif S =="THU":
  print(3)
elif S =="FRI":
  print(2)
elif S =="SAT":
  print(1)

Submission status: Accepted

Solution code:
week = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7-week.index(input()))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
S=input()

ref=["MON" ,"TUE" ,"WED" ,"THU", "FRI" ,"SAT" ,"SUN"]
x=0
for i in range(7):
    if S==ref[i]:
        x=7-i-1
if x==0:
    x=7
print(x)

Submission status: Accepted

Solution code:
week = str(input())

if week == "SUN":
    print(7)
elif week == "MON":
    print(6)
elif  week == "TUE":
    print(5)
elif  week == "WED":
    print(4)
elif  week == "THU":
    print(3)
elif  week == "FRI":
    print(2)
else:
    print(1)

Submission status: Accepted

Solution code:
s = input()

dic = {
    "SUN":7,
    "MON":6,
    "TUE":5,
    "WED":4,
    "THU":3,
    "FRI":2,
    "SAT":1
}

ans = dic[s]
print(ans)

Submission status: Accepted

Solution code:
dic = {'SUN': 0, 'MON': 1, 'TUE': 2, 'WED': 3, 'THU': 4, 'FRI': 5, 'SAT': 6}
S = input()
print(7 - (dic[S]))

Submission status: Accepted

Solution code:
S = input()
week_list = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
print(7 - week_list.index(S))

Submission status: Accepted

Solution code:
s = input()
if s == "SUN":
  print (7)
elif s == "MON":
  print (6)
elif s == "TUE":
  print (5)
elif s == "WED":
  print (4)
elif s == "THU":
  print (3)
elif s == "FRI":
  print (2)
else:
  print (1)

Submission status: Accepted

Solution code:
S = input()
day = {
    "SUN" : 7,
    "MON" : 6,
    "TUE" : 5,
    "WED" : 4,
    "THU" : 3,
    "FRI" : 2,
    "SAT" : 1,
}
print(day[S])

Submission status: Accepted

Solution code:
S = str(input())
if S == 'SUN':
    ans = 7
elif S == 'SAT':
    ans =1
elif S == 'FRI':
    ans =2
elif S == 'THU':
    ans =3
elif S == 'WED':
    ans =4
elif S == 'TUE':
    ans =5
elif S == 'MON':
    ans =6
print(ans)

Submission status: Accepted

Solution code:
S=input()
if S== 'SUN':
    print(7)
elif S=='MON':
    print(6)
elif S=='TUE':
    print(5)
elif S=='WED':
    print(4)
elif S=='THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)

Submission status: Accepted

Solution code:
t=input()
if(t=='SUN'):
    print(7)
elif(t=='MON'):
    print(7-1)
elif(t=='TUE'):
    print(7-2)
elif(t=='WED'):
    print(7-3)
elif(t=='THU'):
    print(7-4)
elif(t=='FRI'):
    print(7-5)
elif(t=='SAT'):
    print(7-6)

Submission status: Accepted

Solution code:
n = str(input())
dic = {"SUN":7 ,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(dic[n])

Submission status: Accepted

Solution code:
s = input()

weekdays = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']

idx = weekdays.index(s)

ans = 7 - (idx + 1) % len(weekdays)

print(ans)

Submission status: Accepted

Solution code:
def main(x: str):
    weekdays = {
        'SAT': 1,
        'SUN': 7,
        'MON': 6,
        'TUE': 5,
        'WED': 4,
        'THU': 3,
        'FRI': 2,
    }
    print(weekdays[x])


if __name__ == '__main__':
    # a = [input() for i in range(n)]
    # points = [s.split(' ') for s in a]

    main(input())

Submission status: Accepted

Solution code:
S = input()


def next_sun(S):
    m = {
        'SUN': 7,
        'MON': 6,
        'TUE': 5,
        'WED': 4,
        'THU': 3,
        'FRI': 2,
        'SAT': 1
    };
    return m[S]

print(next_sun(S))

Submission status: Accepted

Solution code:
import sys
s = input()

if s=="SUN":
  print("7")
  sys.exit()

if s=="MON":
  print("6")
  sys.exit()

if s=="TUE":
  print("5")
  sys.exit()

if s=="WED":
  print("4")
  sys.exit()
  
if s=="THU":
  print("3")
  sys.exit()

if s=="FRI":
  print("2")
  sys.exit()
  
if s=="SAT":
  print("1")
  sys.exit()

Submission status: Accepted

Solution code:
weekdays = ['SUN','MON','TUE','WED','THU','FRI','SAT']
S = input()

for idx, day in enumerate(weekdays):
    if day == S:
        print(7 - idx)
        break

Submission status: Accepted

Solution code:
a = input()
b = 0

if a == 'SAT':
  b=1
elif a=='MON':
  b=6
elif a=='TUE':
  b=5
elif a=='WED':
  b=4
elif a=='THU':
  b=3
elif a=='FRI':
  b=2
else :
  b=7

print(b)

Submission status: Accepted

Solution code:
S = input()
youbi = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-youbi.index(S))

Submission status: Accepted

Solution code:
week=["SUN","MON","TUE","WED","THU","FRI","SAT"]
#print(week)
n=input()
i=0
for i in range(len(week)):
    if week[i]==n:
        print(7-i)

    else:
        pass

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    s=input()
    if s=="SUN":ans=7
    if s=="MON":ans=6
    if s=="TUE":ans=5
    if s=="WED":ans=4
    if s=="THU":ans=3
    if s=="FRI":ans=2
    if s=="SAT":ans=1
    print(ans)
main()

Submission status: Accepted

Solution code:
week =  ['SUN','MON','TUE','WED','THU','FRI','SAT' ]

day = input()

output = 7 - week.index(day)

print(output)

Submission status: Accepted

Solution code:
wd = {'SUN' : 7, "SAT": 1, "FRI": 2, "THU": 3, "WED": 4, "TUE": 5, "MON": 6}
S = input()
print(wd[S])

Submission status: Accepted

Solution code:
S = input()

youbi = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

for i in range(len(youbi)):
    if S == youbi[i]:
        print(7-i)

Submission status: Accepted

Solution code:
S = input()

week = {'SUN': 0,
        'MON': 1,
        'TUE': 2,
        'WED': 3,
        'THU': 4,
        'FRI': 5,
        'SAT': 6}


today = week[S]

if today > 0:
    nextsunday = 7 - today
elif today == 0:
    nextsunday = 7
print(nextsunday)

Submission status: Accepted

Solution code:
s=input()
if s=="SUN":
    print("7")
if s=="MON":
    print("6")
if s=="TUE":
    print("5")
if s=="WED":
    print("4")
if s=="THU":
    print("3")
if s=="FRI":
    print("2")
if s=="SAT":
    print("1")

Submission status: Accepted

Solution code:
S = input()
day_dict = {"SUN" : 7,
            "MON" : 6,
            "TUE" : 5,
            "WED" : 4,
            "THU" : 3,
            "FRI" : 2,
            "SAT" : 1}

print(day_dict[S])

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

s = input()

if s == "SUN\n":
  print("7")
elif s == "MON\n":
  print("6")
elif s == "TUE\n":
  print("5")
elif s == "WED\n":
  print("4")
elif s == "THU\n":
  print("3")
elif s == "FRI\n":
  print("2")
elif s == "SAT\n":
  print("1")

Submission status: Accepted

Solution code:
s = input()

if s == "SUN":
    ans = 7
elif s == "MON":
    ans = 6    
elif s == "TUE":
    ans = 5
elif s == "WED":
    ans = 4
elif s == "THU":
    ans = 3
elif s == "FRI":
    ans = 2
elif s == "SAT":
    ans = 1

print(ans)

Submission status: Accepted

Solution code:
from operator import mul
from functools import reduce
from collections import Counter
# from itertools import combinations as comb
# from itertools import permutations as perm
# from copy import copy
# 配列二分法アルゴリズム
# https://docs.python.jp/3/library/bisect.html
# import bisect
# 桁数指定
# print('{:.3f}'.format(X))
# from collections import defaultdict
# dic = defaultdict(lambda: ...)
# 値で辞書をソート
# sorted(dic.items(), key=lambda x:x[1])
# ヒープキュー
# https://docs.python.org/ja/3/library/heapq.html
# import heapq
# 正規表現(regular expression)のためのモジュール
# import re

import sys

sys.setrecursionlimit(2000)


def inpl():
    return list(map(int, input().split()))


# 重複組み合わせは nHr = (n + r - 1)Cn
def cmb(n, r):
    # combination
    if n < r:
        return 0
    r = min(n - r, r)
    if r == 0:
        return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1, r + 1))
    return over // under


def gcd(a, b):
    # greatest common divisor
    while b > 0:
        a, b = b, a % b

    return a


def lcm(a, b):
    # least common multiple
    return a * b // gcd(a, b)


S = input()

A = ['k', 'SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', "SUN"]

print(A.index(S))

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


def LI(): return list(map(int, input().split()))


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    youbi = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
    S = input()
    S=S[:-1]
    print(7-youbi.index(S))

    return

# B


def B():
    N = II()
    S = input()
    if len(S) % 2 == 0:
        print('No')
        return
    j = S[N//2]
    p = N//2
    for i in S[:N//2]:
        if i != j:
            print('No')
            return
        p += 1
        j = S[p]

    print('Yes')

    return

# C


def C():
    N = II()
    x = [0]*N
    y = [0]*N
    for i in range(N):
        x[i], y[i] = LI()
    ans = 0
    for j in range(N-1):
        for k in range(j+1, N):
            len = sqrt(((x[j]-x[k])*(x[j]-x[k]))+((y[j]-y[k])*(y[j]-y[k])))
            ans += len
    ans = ans*2/N
    print(ans)

    return

# D


def D():

    a, b, x = LI()
    BIG = a*a*b/2
    if x > BIG:
        y = 2*b-(2*x/a/a)
        print(math.degrees(math.atan(y/a)))
    else:
        y = 2*x/a/b
        print(math.degrees(math.atan(b/y)))
    return

# E


def E():
    N, K = LI()
    A = LI()
    F = LI()
    A.sort(reverse=True)
    F.sort()
    cost = []
    for i in range(len(N)):
        cost.append(A[i]*F[i])

    a = F[cost.index(max(cost))]

    return

# F


def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    # you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")


def solution(S):
    # write your code in Python 3.6
    N = len(S)

    pass


# Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

Solution code:
x = str(input())

if x == "SUN":
    print("7\n")
elif x == "MON":
    print("6\n")
elif x == "TUE":
    print("5\n")
elif x == "WED":
    print("4\n")
elif x == "THU":
    print("3\n")
elif x == "FRI":
    print("2\n")
elif x == "SAT":
    print("1\n")

Submission status: Accepted

Solution code:
day_list = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]


def cnt(S):
    return 7 - day_list.index(S)


if __name__ == "__main__":
    S = input()
    print(cnt(S))

Submission status: Accepted

Solution code:
def printdays():
    week = [ "SUN","MON","TUE","WED","THU","FRI","SAT"]
    today = input()
    for i, day in enumerate(week):
        if day==today:
            break
    days = 7-i
    print(days)
if __name__ == "__main__":
    printdays()

Submission status: Accepted

Solution code:
S=input()
S=str(S)
W=['SUN','MON','TUE','WED','THU','FRI','SAT']
for i,j in enumerate(W):
  if j==S:
    print(7-i)

Submission status: Accepted

Solution code:
def solve():
    S = input()
    day = ["MON","TUE","WED","THU","FRI","SAT","SUN"]
    for i in range(len(day)):
        if S == "SUN":
            print(7)
            break
        elif S == day[i]:
            print(6-i)
            break
if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
s = str(input())

if s == "SUN":
    print("7")
elif s == "MON":
    print("6")
elif s == "TUE":
    print("5")
elif s == "WED":
    print("4")
elif s == "THU":
    print("3")
elif s == "FRI":
    print("2")
elif s == "SAT":
    print("1")

Submission status: Accepted

Solution code:
s = input()
if s == 'SAT':
	print(1)
elif s == 'FRI':
	print(2)
elif s == 'THU':
	print(3)
elif s == 'WED':
	print(4)
elif s == 'TUE':
	print(5)
elif s == 'MON':
	print(6)
elif s == 'SUN':
	print(7)

Submission status: Accepted

Solution code:
S = input()
ans = (
    7 if S == "SUN" else
    6 if S == "MON" else
    5 if S == "TUE" else
    4 if S == "WED" else
    3 if S == "THU" else
    2 if S == "FRI" else
    1
)

print(ans)

Submission status: Accepted

Solution code:
S=input()
ans=0
if S=="MON":
  ans=6
elif S=="TUE":
  ans=5
elif S=="WED":
  ans=4
elif S=="THU":
  ans=3
elif S=="FRI":
  ans=2
elif S=="SAT":
  ans=1
else:
  ans=7
print(ans)

Submission status: Accepted

Solution code:
day = str(input())

days = ["SAT","FRI","THU","WED","TUE","MON","SUN"]

for d in days:
    if(day == d):
        print(days.index(d) + 1)

Submission status: Accepted

Solution code:
S = input()

ref = ['SUN','MON','TUE','WED','THU','FRI','SAT']

print(7 - int(ref.index(S)))

Submission status: Accepted

Solution code:
S=input()
week=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-week.index(S))

Submission status: Accepted

Solution code:
weeks = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1}
print(weeks[input()])

Submission status: Accepted

Solution code:
li = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
s = int(li.index(input()))
print(7-s)

Submission status: Accepted

Solution code:
S = input()

if S == 'SUN':
    a = 0
if S == 'MON':
    a = 1
if S == 'TUE':
    a = 2
if S == 'WED':
    a = 3
if S == 'THU':
    a = 4
if S == 'FRI':
    a = 5
if S == 'SAT':
    a = 6
    
print( 7-a )

Submission status: Accepted

Solution code:
str = input()
if str == 'SUN':
  print(7)
elif str == 'MON':
  print(6)
elif str == 'TUE':
  print(5)
elif str == 'WED':
  print(4)
elif str == 'THU':
  print(3)
elif str == 'FRI' :
  print(2)
elif str == 'SAT':
  print(1)

Submission status: Accepted

Solution code:
day_dict = {"SUN": 0,"MON": 1,"TUE": 2,"WED": 3,"THU": 4,"FRI": 5,"SAT": 6}
S = input()
print(7 - day_dict[S])

Submission status: Accepted

Solution code:
s=input()
week=['MON','TUE','WED','THU','FRI','SAT','SUN']
if s!='SUN':
  print(6-week.index(s))
else:
  print(7)

Submission status: Accepted

Solution code:
print(list(reversed(['SUN','MON','TUE','WED','THU','FRI','SAT'])).index(input())+1)

Submission status: Accepted

Solution code:
weeks = {
    'SUN': 7,
    'MON': 6,
    'TUE': 5,
    'WED': 4,
    'THU': 3,
    'FRI': 2,
    'SAT': 1
}

s = input()
print(weeks[s])

Submission status: Accepted

Solution code:
day = input()
     
if(day=="SUN"):
  print(7)
elif(day=="MON"):
  print(6)
elif(day=="TUE"):
  print(5)
elif(day=="WED"):
  print(4)
elif(day=="THU"):
  print(3)
elif(day=="FRI"):
  print(2)
elif(day=="SAT"):
  print(1)

Submission status: Accepted

Solution code:
s = input()
if (s == "SUN"):
    print(7)
elif s == "MON":
    print(6)
elif s == "TUE":
    print(5)
elif s == "WED":
    print(4)
elif s == "THU":
    print(3)
elif s == "FRI":
    print(2)
elif s == "SAT":
    print(1)

Submission status: Accepted

Solution code:
s=input()
days={"SUN":7,"SAT":1,"FRI":2,"THU":3,"WED":4,"TUE":5,"MON":6}
print(days[s])

Submission status: Accepted

Solution code:
days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
S = input()
print(7 - days.index(S))

Submission status: Accepted

Solution code:
S=input()
if S=='SUN':
  print('7')
if S=='MON':
  print('6')
if S=='TUE':
  print('5')
if S=='WED':
  print('4')
if S=='THU':
  print('3')
if S=='FRI':
  print('2')
if S=='SAT':
  print('1')

Submission status: Accepted

Solution code:
Day=["MON","TUE","WED","THU","FRI","SAT","SUN"] 
S=input()
if S=="SUN":
    print(7)
else:
    ans=Day.index(S)
    print(6-ans)

Submission status: Accepted

Solution code:
s = input()
day = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-day.index(s))

Submission status: Accepted

Solution code:
S = input()
if S=="SUN":
  print(7)
elif S=="MON":
  print(6)
elif S=="TUE":
  print(5)
elif S=="WED":
  print(4)
elif S=="THU":
  print(3)
elif S=="FRI":
  print(2)
elif S=="SAT":
  print(1)

Submission status: Accepted

Solution code:
# 2019/11/24

s=input()
if s=='SUN':
    print(7)
if s=='MON':
    print(6)
if s=='TUE':
    print(5)
if s=='WED':
    print(4)
if s=='THU':
    print(3)
if s=='FRI':
    print(2)
if s=='SAT':
    print(1)

Submission status: Accepted

Solution code:
x = ['SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', 'SUN']
print(x.index(input()) + 1)

Submission status: Accepted

Solution code:
s = input()
arr = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']

print(7 - arr.index(s))

Submission status: Accepted

Solution code:
day=input()
if (day=="SUN"):
  print(7)
elif (day=="MON"):
  print(6)
elif (day=="TUE"):
  print(5)
elif(day=="WED"):
  print(4)
elif(day=="THU"):
  print(3)
elif(day=="FRI"):
  print(2)
elif(day=="SAT"):
  print(1)

Submission status: Accepted

Solution code:
S = str(input())
day = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-day.index(S))

Submission status: Accepted

Solution code:
S = input()
ans = 0
if S == 'SUN':
    ans = 7
if S == 'MON':
    ans = 6
if S == 'TUE':
    ans = 5
if S == 'WED':
    ans = 4
if S == 'THU':
    ans = 3
if S == 'FRI':
    ans = 2
if S == 'SAT':
    ans = 1

print(ans)

Submission status: Accepted

Solution code:
ans = dict()
ans["SUN"]=7
ans["MON"]=6
ans["TUE"]=5
ans["WED"]=4
ans["THU"]=3
ans["FRI"]=2
ans["SAT"]=1

s = input()
print(ans[s])

Submission status: Accepted

Solution code:
w = input()
week = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
i = 0
while i < 7:
  if w == week[i]:
    print( 7-i )
    break
  else:
    i += 1