TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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)?

Submission attempts (in order):
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')

    

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)


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)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
s=input()
dict1={7:'SUN',6:'MON',5:'TUE',4:'WED',3:'THU',2:'FRI',1:'SAT'}
keys = [k for k, v in dict1.items() if v == s]
print(keys)

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

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
D_dict = {}
D_dict['SUN'] = 7
D_dict['MON'] = 6
D_dict['TUE'] = 5
D_dict['WED'] = 4
D_dict['THU'] = 3
D_dict['FRI'] = 2
D_dict['SAT'] = 1

S = input()
D_dict[S]

S = input()

D_dict = {}
D_dict['SUN'] = 7
D_dict['MON'] = 6
D_dict['TUE'] = 5
D_dict['WED'] = 4
D_dict['THU'] = 3
D_dict['FRI'] = 2
D_dict['SAT'] = 1

print(D_dict[S])

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
L = ['SAT','FRI','THU','WED','TUE','MON','SUN']

for i,l in enumerate(L):
  if S == l:
    print(i+1)
    break

import math
A, B, X = map(int, input().split())
L = []
for ln_N in range(17):
    N = math.floor((X - B * ln_N) / A)
    if N <= 0:
        L.append(0)
    else:
        if math.floor(math.log10(N)+1) == ln_N:
            L.append(N)
print(min(1000000000,max(L)))


S = input()
L = ['SAT','FRI','THU','WED','TUE','MON','SUN']
for i,l in enumerate(L):
  if S == l:
    print(i+1)
    break

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
su,keta,yosa=map(int,input().split())
if yosa<(su+keta):print(0);exit()
i=1
while su*(10**i)+keta*(i+1)<=yosa and i<10:
  i+=1
if i==10:print(10**9);exit()
f=(yosa-i*keta)//su
for j in range(f+3)[::-1]:
  if  j*su+keta*i<=yosa and len(str(j))==i:
    print(j)
    break

s=input()
l=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-l.index(s))

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
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)
else str=="SAT":
  print(1)

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)
else :
  print(1)

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
S = input()

days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'}
print(7 - days.index(S))

S = input()

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

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
s = input() 
day = ['SUN','MON','TUE','WED','THU','FRI','SAT'][::-1]
dic = {d:i+1 in i,d zip(range(len(day),day))}
print(dic[s])

day = ['SUN','MON','TUE','WED','THU','FRI','SAT'][::-1]
dic = {d:i+1 for i,d in zip(range(len(day)),day)}
print(dic[input()])

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
S = input()
a = 0

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

print(a)

S = input()
w = ['SUN','MON','TUE','WED','THU','FRI','SAT']

a = w.index(S)

print(7 - a)

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
from itertools import accumulate
from math import factorial as fc

def cmb_2(n):
    return n*(n-1)//2

N,K = map(int, input().split(' '))
A = list(map(int, input().split(' ')))
A = [i-1 for i in A]

sumA = list(accumulate(A))
sumA = [0]+[i % K for i in sumA]
x = sumA[:K]
modmap = [0]*K
for i in x:
    modmap[i] += 1

ans = 0
for i in range(K):
    ans += cmb_2(modmap[i],2)

for i in range(N-K+1):
    modmap[sumA[K+i]] += 1
    modmap[sumA[i]] -= 1
    ans += modmap[sumA[K+i]]-1

print(ans)

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

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
s = input()
slist = [SUN,MON,TUE,WED,THU,FRI,SAT]
i = slist[s]
  
print(7-i)

n = int(input())
S = input()

ans=[]
for i in range(len(S)):
  s = S[i]
  sind = ord('A') + (ord(s)-ord('A')+ n)%26
  ans.append(chr(sind))

print(ans)

import numpy as np
s = input()
slist = np.array(['SUN','MON','TUE','WED','THU','FRI','SAT'])
i = np.where(slist==s)[0]
  
print(7-i)

import numpy as np
s = input()
slist = np.array(['SUN','MON','TUE','WED','THU','FRI','SAT'])
i = np.where(slist==s)[0]
  
print(7-i)

s = input()
slist = [SUN,MON,TUE,WED,THU,FRI,SAT]
i = slist[s]
if i == 6:
  i = -1
  
print(slist[i+1])

import numpy as np
s = input()
slist = np.array(['SUN','MON','TUE','WED','THU','FRI','SAT'])
i = np.where(slist==s)[0][0]

print(7-i)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
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)
else:
    print('間違ってます')

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)

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
s = input()
x = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7-x.find(s))

a,b,x = list(map(int,input().split()))
if a*10**9+b*10 <= x:
  print(10**9)
elif a+b > x:
  print(0)
else:
  for i in range(9,0,-1):
    y = (x - i*b)//a
    if len(str(y))==i:
      print(max(0,y))
      break
  else:
    print(0)

a,b,x = list(map(int,input().split()))
if a*10**9+b*10 <= x:
  print(10**9)
elif a+b > x:
  print(0)
else:
  for i in range(9,0,-1):
    y = (x - i*b)//a
    if len(str(y))==i:
      if y<0:
        continue
      print(y)
      break
  else:
    print(0)

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
a = input()
b = input()

N = int(a)
S = b

alpha_dict = {chr(c): i+1 for i, c in enumerate(range(ord('A'), ord('Z')+1))}

st =""

for c in S:
    n = alpha_dict[c]
    n = n + N
    if (n > 26):
        n = n - 26
    keys = [k for k, v in alpha_dict.items() if v == n]
    st += str(keys[0])
    
print(st)

str = input()
#days = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

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

str = input()
#days = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

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

string = input()
#days = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
s = input()
res = 0
if s == "SUN":
  res = 7
elif s == "MON":
  res = 6
elif s == "TUE":
  res = 5
elif s == "WED":
  res = 4
leif s == "THU":
  res = 3
elif s == "FRI":
  res = 2
elif s == "SAT":
  res = 1
print(res)

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

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):


S = input()

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



S = input()

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




S = input()

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



S = input()

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

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




S = input()

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

print(ANSWER)

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)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
a,b,x=map(int,input().split())

def calc(n):
      p=a*n+b*len(str(n))
      return p<=x

h=10**9+1
ok=0
while h-ok>1:
      m=(h+ok)//2
      if calc(m):
            ok=m
      else:
            h=m

print(ok)


a,b,x=map(int,input().split())

def calc(n):
      p=a*n+b*len(str(n))
      return p<=x

h=10**9+1
ok=0
while h-ok>1:
      m=(h+ok)//2
      if calc(m):
            ok=m
      else:
            h=m

print(ok)


s = input()
week=["SAT","FRI","THU","WED","TUE","MON","SUN"]
for i in range(0,7):
    if s == week[i]:
        print(i+1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
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 == "FRY":
  print("2")
elif s == "SAT":
  print("1")

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")

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
N = [input() for i in range(1)]
str = [input() for i in range(1)]
STRING=str[0]
enc = ""

for i in list(STRING):
    ASCII = ord(i)
    num = ASCII - 65
    num = (num + int(N[0])) % 26
    ASCII = num + 65
    enc += chr(ASCII)
print(enc)

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)


Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
s = input()

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


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)


Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
daw = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = input()
ind = daw.find(S)
print(7 - idx)


daw = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = input()
ind = daw.index(S)
print(7 - idx)


daw = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = input()
ind = S.find(daw)
print(7 - idx)


import sys

input = sys.stdin.readline


def main():
    next_day = {
        "SAT": 1,
        "FRI": 2,
        "THU": 3,
        "WED": 4,
        "TUE": 5,
        "MON": 6,
        "SUN": 7,
    }

    S = input().rstrip()
    ans = next_day[S]
    print(ans)


if __name__ == "__main__":
    main()


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
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   

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)


Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
s = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = input()
print(7 - index(S))

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


Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
a=["SUN","MON","TUE","WED","THU","FRI","SAT"]
s=input()
print(7-a.index(str))

a=["SUN","MON","TUE","WED","THU","FRI","SAT"]
s=input()
print(7-a.index(s))

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
s = input()
w = ['SUM','MON','TUE','WED','THU','FRI','SAT']
for i in range(len(S)):
    if s == w[i]:
        print 7 - i


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

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
print(input()[{
  "SAT": 1
  "FRI": 2,
  "THU": 3,
  "WED": 4,
  "TUE": 5,
  "MON": 6,
  "SUN": 7
}])

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
D = {"SUN": 7, "MON": 6, "TUE": 5, "WED": 4, "THU": 3, "FRI": 2, "SUT": 1}
print(D[input()])

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

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
n = int(input())
i_s = input()
out = ''
for s in i_s:
       s = ord(s)
       s = s + n
       if s >= 91 :
            s=s%26 + 25
       s = chr(s)
       out += s

print(out)

N = int(input())
S = input()

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

print(S.translate(str.maketrans(alphabet, alphabet[N:] + alphabet[:N])))

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
s=input()
if(s=="SUN")x=7
if(s=="MON")x=6
if(s=="TUE")x=5
if(s=="WED")x=4
if(s=="THU")x=3
if(s=="FRI")x=2
if(s=="SAT")x=1
print(x)

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


Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
S = ["STA","FRI","THU","WED","TUE","MON","SUN"]
T = input()
count=1
for i in S:
    if i == T:
        print(count)
    count+=1

S = ["SAT","FRI","THU","WED","TUE","MON","SUN"]
T = input()
count=1
for i in S:
    if i == T:
        print(count)
    count+=1

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
s = str(input())
l = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
 
if s == "SUN":
  print(7)
else:
  for i in range(7):
    if s == l[i]:
       print(i)

s=str(input())
l=['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-i)

s = str(input())
l = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']
 
if s == "SUN":
  print(7)
else:
  for i in range(7):
    if s == l[i]
       print(i)

s = str(input())
l = [MON, TUE, WED, WED, THU, FRI, SAT, SUN]

if s == "SUN":
  print(7)
else:
  for i in range(7):
    if s == l[i]
       print(i)


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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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)?

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

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

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

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)

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
def main():
  mapping = {
    "SUN": 0,
    "MON": 1,
    "TUE": 2,
    "WED": 3,
    "THU": 4,
    "FRI": 5,
    "SAT": 6,
  }


  S = input()
  return 7-mapping[S]

if __name__ == '__main__':
  main()




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


S = input()
return 7-mapping[S]




def main():
  mapping = {
    "SUN": 0,
    "MON": 1,
    "TUE": 2,
    "WED": 3,
    "THU": 4,
    "FRI": 5,
    "SAT": 6,
  }
 
 
  S = input()
  print(7-mapping[S])
 
if __name__ == '__main__':
  main()

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
S = str(input())
day_list = ["MON", "TUE", "WED", "THU", "FRI", "SAT"]
if S == "SUN":
  print(7)
else:
  ind = day_list.index(S)
  printt(6-ind)

S = input()
day_list = ["MON", "TUE", "WED", "THU", "FRI", "SAT"]
if S == "SUN":
  print(7)
else:
  ind = day_list.index(S)
  printt(6-ind)

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
S = int(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)

S = int(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)


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)
else:
    print(1)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
S = input()
day_list = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

day_num = day_list.index(S)

print(day_list[day_num+1])

S = input()
day_list = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

day_num = day_list.index(S)

print(7-day_num)


Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
import sys
a,b,x = map(int,input().split())
limit = 10**9
ans = 0
for d in range(1,10):
  n = (x - (b * d)) // a
  #if n <= limit and len(str(n)) == d:
    
  #elif n > limit:
    
  
  if 10**(d - 1) <= n < 10**d:
    ans = n
  elif n >= 10**d:
    
    ans = 10**d-1
if x>=a*limit + b*10:
  ans = limit
print(ans)

s=input()
days = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
index = days.index(s)
print(6 - index + 1)
#map(int,input().split())
#list(map(int,input().split()))

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
S = str(input())

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

print(L.index(S))

S = str(input())

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

print(L.index(S))

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
def main():
    A, B, X = list(map(int, input().split()))
    if A >= X or B >= X:
        N = 0
    else:
        for d in range(len(str(X)), 0, -1):
            if d * B < X:
                break
        if d > 0:
            N = 0
            d = min(X // A, pow(10, d))
            for N in range(d, 0, -1):
                if afford(A, B, N, X):
                    break
            else:
                N = 0
        else:
            N = 0
    print(N if N < 1e9 else int(1e9))


def afford(a, b, n, x):
    c = a * n
    if c >= x:
        return False
    y = c + b * len(str(n))
    return y <= x


if __name__ == "__main__":
    main()

def main():
    A, B, X = list(map(int, input().split()))
    if A >= X or B >= X:
        N = 0
    elif X > 1e9 and afford(A, B, 1e9, X):
        N = int(1e9)
    else:
        limmin = 0
        limmax = 10 ** 9 + 1
        while limmax - limmin > 1:
            m = (limmax + limmin) // 2
            if afford(A, B, m, X):
                limmin = m
            else:
                limmax = m
        N = limmin
    print(N)


def afford(a, b, n, x):
    y = a * n + b * len(str(n))
    return y <= x


if __name__ == "__main__":
    main()

def main():
    A, B, X = list(map(int, input().split()))
    if A >= X or B >= X:
        N = 0
    else:
        for d in range(len(str(X)), 0, -1):
            if d * B < X:
                break
        if d > 0:
            d = min(X // A, pow(10, d))
            for N in range(d, 0, -1):
                if afford(A, B, N, X):
                    break
            else:
                N = 0
        else:
            N = 0
    print(N if N < 1e9 else int(1e9))


def afford(a, b, n, x):
    c = a * n
    if c >= x:
        return False
    y = c + b * len(str(n))
    return y <= x


if __name__ == "__main__":
    main()

def main():
    dow = ['SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', 'SUN']
    s = input()
    i = dow.index(s) + 1
    print(i)


if __name__ == "__main__":
    main()

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
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)

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)

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
N = int(input())
S = input()

ns = []

for ch in S:
        
    if ('A' <= ch and ch <= 'Z'):
        ns.append(chr((ord(ch) - ord('A') + N) % 26 + ord('A')))

O = "".join(ns)
print(O)

S = input()

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

O = mydict[S]

print(O)

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
from collections import deque
n = int(input())
list = []
for i in range(n-1): 
    M = input()    
    m = M.split()
    p = [int(i) for i in m] 
    p = p + [i]
    list.append(p) 
color = [0 for i in range(n-1)] 
maxcolor = 1
N = deque([[1,0]]) 
delete = deque() 
while len(list) != 0:
    a = N.popleft()
    b = 0
    for i, value in enumerate(list):
        if value[0] == a[0]:
            b = b + 1
            if b == a[1]:
                b = b + 1
            N.append([value[1],b])
            color[value[2]] = b
            delete.append(i)
            if maxcolor < b:
                maxcolor = b
        elif value[1] == a[0]:
            b = b + 1
            if b == a[1]:
                b = b + 1
            N.append([value[0],b])
            color[value[2]] = b
            delete.append(i)
            if maxcolor < b:
                maxcolor = b
    else:
        c = 0
        while len(delete) != 0:
            c = c + 1
            d = delete.popleft()
            del list[d-c+1]
print(maxcolor)
for i in color:
    print(i)

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
Week=["SAT","FRI","THU","WED","TUE","MON","SUN"]
 Day=input()
 print(Week.index(Day)+1)

Week=["SAT","FRI","THU","WED","TUE","MON","SUN"]
Day=input()
print(Week.index(Day)+1)

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
s = str(input())
a = ["SUN","MON","TUE","WED","THE","FRI","SAT"]

i = 0
for i in range(7):
    if i != 6:
        print(int(7-i))
        break
    else:
        print(1)
        break

s = input('')
a = ['SUN','MON','TUE','WED','THU','FRI','SAT']

for i in range(7):
    if i != 6 and s == a[i]:
        print(int(7-i))
        break
    elif i == 6:
        print(1)

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
memo = ['SUN','MON','TUE','WED','THU','FRI','SAT','SUN']
a = input()

print(memo.index(a)+1)

memo = ['SUN','MON','TUE','WED','THU','FRI','SAT']
a = input()

print(7-memo.index(a))

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
S=input()
w_dict = {'SUN':0,'MON':1,'TUE':2,'WED':3,'THU':4,'FRI':5,'SAT':6}
print(w_dict[S]%7)

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

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
#!/usr/bin/env python3
import math

A, B, X = [int(s) for s in input().split()]
right = 10 ** 9
left = 1

if A + B > X:
    print(0)
    exit()

if A * right + B * 10 <= X:
    print(right)
    exit()

while (left < right):
    middle = (left + right) // 2 + 1
    if A * middle + B * int((math.log(middle * 10, 10))) < X:
        left = middle 
    else:
        right = middle - 1

print(right)

week = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']
S = input()

print(6 - week.index(S)) if week.index(S) != 6 else print(7)

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
print(10**9)

S=input()
list=[0,"SAT","FRI","THU","WED","TUE","MON","SUN"] 
print(list.index(S))

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.  Shift each character of S by N in alphabetical order (see below), and print the resulting string.  We assume that `A` follows `Z`. For example, shifting `A` by 2 results in `C` (`A` \to `B` \to `C`), and shifting `Y` by 3 results in `B` (`Y` \to `Z` \to `A` \to `B`).

Submission attempts (in order):
import string
A = list(string.ascii_uppercase)
N = int(input()) % 26
S = input()
Output = ''
for i in range(len(S)):
    for j in range(len(A)):
        if A[j] == S[i]:
            Output += A[j+N]
print(Output)

import string
A = list(string.ascii_uppercase)
N = int(input())
S = input()
Output = ''
for i in range(len(S)):
    for j in range(len(A)):
        if A[j] == S[i]:
            Output += A[(j+N) % 26]
print(Output)

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.  Shift each character of S by N in alphabetical order (see below), and print the resulting string.  We assume that `A` follows `Z`. For example, shifting `A` by 2 results in `C` (`A` \to `B` \to `C`), and shifting `Y` by 3 results in `B` (`Y` \to `Z` \to `A` \to `B`).

Submission attempts (in order):
n = int(input())
s = input()
ans = ""
for i in range(len(s)):
    index = ord(s[i]) + n
    if index > ord("Z"):
        index = index - ord("Z") - 1
    
    ans += chr(index)
print(ans)


n = int(input())
s = input()
ans = ""
for i in range(len(s)):
    index = ord(s[i]) + n
    if index > ord("Z"):
        index = (index - ord("Z") - 1) + (ord("A"))
    
    ans += chr(index)
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.  Shift each character of S by N in alphabetical order (see below), and print the resulting string.  We assume that `A` follows `Z`. For example, shifting `A` by 2 results in `C` (`A` \to `B` \to `C`), and shifting `Y` by 3 results in `B` (`Y` \to `Z` \to `A` \to `B`).

Submission attempts (in order):
num = int(input())
str = list(input())
alp = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
out=""
for i in range(len(str)):
	for l in range(len(alp)):
		if str[i]==alp[l]:
			out+=alp[l+num]
			break
print(out)


num = int(input())
str = list(input())
alp = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
out=""
for i in range(len(str)):
	for l in range(len(alp)):
		if str[i]==alp[l]:
			out+=alp[(l+num)%26]
			break
print(out)

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.  Shift each character of S by N in alphabetical order (see below), and print the resulting string.  We assume that `A` follows `Z`. For example, shifting `A` by 2 results in `C` (`A` \to `B` \to `C`), and shifting `Y` by 3 results in `B` (`Y` \to `Z` \to `A` \to `B`).

Submission attempts (in order):
N = int(input())
S = input()
print(len(S))
new_S = ''
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

for s in range (len(S)):
    for i in range(26):
        if (S[s] == alphabet[i]):
            new_S += alphabet[i+N]
            break
print(new_S)

N = int(input())
S = input()
new_S = ''
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

for s in range (len(S)):
    for i in range(26):
        if (S[s] == alphabet[i]):
            new_S += alphabet[i+N]
            break
print(new_S)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.  Shift each character of S by N in alphabetical order (see below), and print the resulting string.  We assume that `A` follows `Z`. For example, shifting `A` by 2 results in `C` (`A` \to `B` \to `C`), and shifting `Y` by 3 results in `B` (`Y` \to `Z` \to `A` \to `B`).

Submission attempts (in order):
n=int(input())
s=input()
c=""
for i in s:
  w=ord(i)+ord("A")
  if w>ord("Z"):
    w=w-ord("Z")-1+ord("A")
  c+=chr(w)
print(c)

n=int(input())
n=n%26
s=input()
out=""
for i in s:
  no=ord(i)+n
  if no>ord("Z"):
    no=no-ord("Z")+ord("A")-1
  out+=ord(no)
print(out)
  

n=int(input())
s=input()
c=""
w=0
for i in s:
  w=ord(i)+n
  if w>ord("Z"):
    w=w-ord("Z")-1+ord("A")
  c+=chr(w)
  
print(c)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.  Shift each character of S by N in alphabetical order (see below), and print the resulting string.  We assume that `A` follows `Z`. For example, shifting `A` by 2 results in `C` (`A` \to `B` \to `C`), and shifting `Y` by 3 results in `B` (`Y` \to `Z` \to `A` \to `B`).

Submission attempts (in order):
n = int(input())
s = input()
alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]*2

ans = [0]*n
for i in range(s):
    S = s[i]
    key = alphabet.index(S)
    ans[i] = alphabet[key+n]
print("".join(ans))

n = int(input())
s = input()
alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]

ans = [0]*len(s)
for i in range(len(s)):
    S = s[i]
    key = (alphabet.index(S))
    ans[i] = alphabet[(key+n)%26]
print("".join(ans))

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.  Shift each character of S by N in alphabetical order (see below), and print the resulting string.  We assume that `A` follows `Z`. For example, shifting `A` by 2 results in `C` (`A` \to `B` \to `C`), and shifting `Y` by 3 results in `B` (`Y` \to `Z` \to `A` \to `B`).

Submission attempts (in order):
n=int(input())
A=list(input())
B=""
for i in A:
  x=ord(i)
  B+=(chr(x+1))
print(str(B))

n=int(input())
s=list(input())
ans=""
for i in s:
  q=ord(i)-65
  ans+=chr((q+n)%26)
print(ans)

n=int(input())
s=list(input())
ans=""
for i in s:
  q=ord(i)-65
  ans+=chr((q+n)%26+65)
print(ans)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.  Shift each character of S by N in alphabetical order (see below), and print the resulting string.  We assume that `A` follows `Z`. For example, shifting `A` by 2 results in `C` (`A` \to `B` \to `C`), and shifting `Y` by 3 results in `B` (`Y` \to `Z` \to `A` \to `B`).

Submission attempts (in order):
n=int(input())
s=list(input())
s.pop(n)
print(s.append(s.pop(n)))

n=int(input())
s=input()
s.pop(n)
print(s.append(s.pop(n)))

N = int(input())
S = [i for i in input()]
alpha=['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
ans=''
for c in S:
    cnt = alpha.index(c)+N
    if cnt > 25:
        cnt=cnt-26
    c = alpha[cnt]
    ans+=c
print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.  Shift each character of S by N in alphabetical order (see below), and print the resulting string.  We assume that `A` follows `Z`. For example, shifting `A` by 2 results in `C` (`A` \to `B` \to `C`), and shifting `Y` by 3 results in `B` (`Y` \to `Z` \to `A` \to `B`).

Submission attempts (in order):
n = int(input())
s = input()

alpha = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

for i in len(s)
  s[i] = alpha[(alpha.index(s[i])+n)%26]

print(''.join(s))


n = int(input())
s = list(input())

alpha = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

for i in range(len(s)):
  s[i] = alpha[(int(alpha.index(s[i]))+n)%26]

print(''.join(s))

Verdicts: Runtime Error

Accepted