TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: We have a grid with H horizontal rows and W vertical columns. Let (i,j) denote the square at the i-th row from the top and the j-th column from the left.  The square (i, j) has two numbers A_{ij} and B_{ij} written on it.  First, for each square, Takahashi paints one of the written numbers red and the other blue.  Then, he travels from the square (1, 1) to the square (H, W). In one move, he can move from a square (i, j) to the square (i+1, j) or the square (i, j+1). He must not leave the grid.  Let the _unbalancedness_ be the absolute difference of the sum of red numbers and the sum of blue numbers written on the squares along Takahashi's path, including the squares (1, 1) and (H, W).  Takahashi wants to make the unbalancedness as small as possible by appropriately painting the grid and traveling on it.  Find the minimum unbalancedness possible.

Submission attempts (in order):
import numpy as np

H, W = map(int, input().split())
lst1 = []
lst2 = []
for _ in range(H):
    lst1.append([int(i) for i in input().split()])
for _ in range(H):
    lst2.append([int(i) for i in input().split()])
arr1, arr2 = np.array(lst1), np.array(lst2)
arr = np.abs(arr1 - arr2)

d = [[0] * W for _ in range(H)]
m = 80 * (H + W)
d[0][0] = 1 << m
for h in range(H):
    for w in range(W):
        x = arr[h][w]
        if h > 0:
            print(h,w)
            d[h][w] |= d[h - 1][w]
        if w > 0:
            d[h][w] |= d[h][w - 1]
        d[h][w] = d[h][w] << x | d[h][w] >> x

x, y= 1 << m, 1 << m
for i in range(m + 1):
    if d[H - 1][W - 1] & x or d[H - 1][W - 1] & y:
        print(i)
        quit()
    x<<=1
    y>>=1

H,W=map(int,input().split())
A=[list(map(int,input().split())) for i in range(H)]
B=[list(map(int,input().split())) for i in range(H)]
d=[[0]*W for j in range(H)]
m=80*(H+W)
d[0][0]=1<<m
for h in range(H):
    for w in range(W):
        x=abs(A[h][w]-B[h][w])
        if h>0:
            d[h][w]|=d[h-1][w]
        if w>0:
            d[h][w]|=d[h][w-1]
        d[h][w]=d[h][w]<<x|d[h][w]>>x
x,y=1<<m,1<<m
for i in range(99):
    if d[H-1][W-1]&x or d[H-1][W-1]&y:
        print(i)
        exit()
    x<<=1
    y>>=1


Verdicts: Wrong Answer

Accepted
Problem: We have a grid with H horizontal rows and W vertical columns. Let (i,j) denote the square at the i-th row from the top and the j-th column from the left.  The square (i, j) has two numbers A_{ij} and B_{ij} written on it.  First, for each square, Takahashi paints one of the written numbers red and the other blue.  Then, he travels from the square (1, 1) to the square (H, W). In one move, he can move from a square (i, j) to the square (i+1, j) or the square (i, j+1). He must not leave the grid.  Let the _unbalancedness_ be the absolute difference of the sum of red numbers and the sum of blue numbers written on the squares along Takahashi's path, including the squares (1, 1) and (H, W).  Takahashi wants to make the unbalancedness as small as possible by appropriately painting the grid and traveling on it.  Find the minimum unbalancedness possible.

Submission attempts (in order):
h, w = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(h)]
b = [list(map(int, input().split())) for _ in range(h)]

x = (h + w) * 80

dp = [[0] * w for _ in range(h)]
d = abs(a[0][0] - b[0][0])
dp[0][0] = 1 << (x - d)

for i in range(h):
    for j, (ae, be) in enumerate(zip(a[i], b[i])):
        if h == w == 0:
            continue

        d = abs(ae - be)
        bt = 0
        if i != 0:
            bt |= dp[i-1][j] << d
            bt |= dp[i-1][j] >> d

        if j != 0:
            bt |= dp[i][j-1] << d
            bt |= dp[i][j-1] >> d

        dp[i][j] = bt

dp = dp[-1][-1]

b = bin(dp)[2:]
can_make = [i - x for i, be in enumerate(b[::-1]) if be == "1"]

ans = min(x if x >= 0 else -x for x in can_make)
print(ans)


h, w = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(h)]
b = [list(map(int, input().split())) for _ in range(h)]

x = (h + w) * 80

dp = [[0] * w for _ in range(h)]
d = abs(a[0][0] - b[0][0])
dp[0][0] = 1 << (x - d)

for i in range(h):
    for j, (ae, be) in enumerate(zip(a[i], b[i])):
        if i == j == 0:
            continue

        d = abs(ae - be)
        bt = 0
        if i != 0:
            bt |= dp[i-1][j] << d
            bt |= dp[i-1][j] >> d

        if j != 0:
            bt |= dp[i][j-1] << d
            bt |= dp[i][j-1] >> d

        dp[i][j] = bt

dp = dp[-1][-1]

b = bin(dp)[2:]
can_make = [i - x for i, be in enumerate(b[::-1]) if be == "1"]

ans = min(x if x >= 0 else -x for x in can_make)
print(ans)


Verdicts: Runtime Error

Accepted
Problem: We have a grid with H horizontal rows and W vertical columns. Let (i,j) denote the square at the i-th row from the top and the j-th column from the left.  The square (i, j) has two numbers A_{ij} and B_{ij} written on it.  First, for each square, Takahashi paints one of the written numbers red and the other blue.  Then, he travels from the square (1, 1) to the square (H, W). In one move, he can move from a square (i, j) to the square (i+1, j) or the square (i, j+1). He must not leave the grid.  Let the _unbalancedness_ be the absolute difference of the sum of red numbers and the sum of blue numbers written on the squares along Takahashi's path, including the squares (1, 1) and (H, W).  Takahashi wants to make the unbalancedness as small as possible by appropriately painting the grid and traveling on it.  Find the minimum unbalancedness possible.

Submission attempts (in order):
t=a[i-1][j-1]
dp[i][j][k]=(dp[i-1][j][abs(k+t)]
             or dp[i-1][j][abs(k-t)]
             or dp[i][j-1][abs(k+t)]
             or dp[i][j-1][abs(k-t)])

h,w = map(int,input().split())
a = [list(map(int,input().split())) for i in range(h)]
b = [list(map(int,input().split())) for i in range(h)]
grid = [[0 for i in range(w)] for j in range(h)]
for i in range(h):
  for j in range(w):
    grid[i][j] = abs(a[i][j]-b[i][j])
dp = [[0 for j in range(w)] for k in range(h)]
buf = (h+w)*80
for i in range(h):
  for j in range(w):
      t = grid[i][j]
      if i == j == 0:
        dp[i][j] = 1 << buf+t | 1 << buf-t
      if j > 0:
        dp[i][j] = dp[i][j] | dp[i][j-1] << t | dp[i][j-1] >> t
      if i > 0:
        dp[i][j] = dp[i][j] | dp[i-1][j] << t | dp[i-1][j] >> t
print(bin(dp[h-1][w-1]))
for i in range(buf):
  if (dp[h-1][w-1] & 1 << buf+i) or (dp[h-1][w-1] & 1 << buf-i):
    print(i)
    exit()

h,w = map(int,input().split())
a = [list(map(int,input().split())) for i in range(h)]
b = [list(map(int,input().split())) for i in range(h)]
grid = [[0 for i in range(w)] for j in range(h)]
for i in range(h):
  for j in range(w):
    grid[i][j] = abs(a[i][j]-b[i][j])
dp = [[0 for j in range(w)] for k in range(h)]
buf = (h+w)*80
for i in range(h):
  for j in range(w):
      t = grid[i][j]
      if i == j == 0:
        dp[i][j] = 1 << buf+t | 1 << buf-t
      if j > 0:
        dp[i][j] = dp[i][j] | dp[i][j-1] << t | dp[i][j-1] >> t
      if i > 0:
        dp[i][j] = dp[i][j] | dp[i-1][j] << t | dp[i-1][j] >> t
for i in range(buf):
  if (dp[h-1][w-1] & 1 << buf+i) or (dp[h-1][w-1] & 1 << buf-i):
    print(i)
    exit()

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have a grid with H horizontal rows and W vertical columns. Let (i,j) denote the square at the i-th row from the top and the j-th column from the left.  The square (i, j) has two numbers A_{ij} and B_{ij} written on it.  First, for each square, Takahashi paints one of the written numbers red and the other blue.  Then, he travels from the square (1, 1) to the square (H, W). In one move, he can move from a square (i, j) to the square (i+1, j) or the square (i, j+1). He must not leave the grid.  Let the _unbalancedness_ be the absolute difference of the sum of red numbers and the sum of blue numbers written on the squares along Takahashi's path, including the squares (1, 1) and (H, W).  Takahashi wants to make the unbalancedness as small as possible by appropriately painting the grid and traveling on it.  Find the minimum unbalancedness possible.

Submission attempts (in order):
import sys
#input = sys.stdin.readline

def main():
    inp = lambda: list(map(int, input().split())) 
    h,w=inp()
    a=[inp() for _ in range(h)]
    b=[inp() for _ in range(h)]
    d=[[0]*w for _ in range(h)]
    for i in range(h):
        for j in range(w):
            d[i][j]=abs(a[i][j]-b[i][j])
    zero=80*(h+w)+2
    dp=[[0]*w for _ in range(h)]
    dp[0][0]=1<<(zero+d[0][0])|1<<(zero-d[0][0])
    for i in range(h):
        for j in range(w):
            if i==0:
                if j==0:
                    continue
                else:
                    dp[i][j]=dp[i][j-1]<<d[i][j]|dp[i][j-1]>>d[i][j]
            else:
                if j==0:
                    dp[i][j]=dp[i-1][j]<<d[i][j]|dp[i-1][j]>>d[i][j]
                else:
                    dp[i][j]=dp[i-1][j]<<d[i][j]|dp[i-1][j]>>d[i][j]
                    dp[i][j]=dp[i][j]|(dp[i][j-1]<<d[i][j]|dp[i][j-1]>>d[i][j])
    ans=dp[-1][-1]
    print(dp)
    for i in range(zero):
        if ans>>(zero+i)&1 or ans>>(zero-i)&1:
            print(i)
            exit()

if __name__ == '__main__':
    main()

import sys
#input = sys.stdin.readline

def main():
    inp = lambda: list(map(int, input().split())) 
    h,w=inp()
    a=[inp() for _ in range(h)]
    b=[inp() for _ in range(h)]
    d=[[0]*w for _ in range(h)]
    for i in range(h):
        for j in range(w):
            d[i][j]=abs(a[i][j]-b[i][j])
    zero=80*(h+w)+2
    dp=[[0]*w for _ in range(h)]
    dp[0][0]=1<<(zero+d[0][0])|1<<(zero-d[0][0])
    for i in range(h):
        for j in range(w):
            if i==0:
                if j==0:
                    continue
                else:
                    dp[i][j]=dp[i][j-1]<<d[i][j]|dp[i][j-1]>>d[i][j]
            else:
                if j==0:
                    dp[i][j]=dp[i-1][j]<<d[i][j]|dp[i-1][j]>>d[i][j]
                else:
                    dp[i][j]=dp[i-1][j]<<d[i][j]|dp[i-1][j]>>d[i][j]
                    dp[i][j]=dp[i][j]|(dp[i][j-1]<<d[i][j]|dp[i][j-1]>>d[i][j])
    ans=dp[-1][-1]
    for i in range(zero):
        if ans>>(zero+i)&1 or ans>>(zero-i)&1:
            print(i)
            exit()

if __name__ == '__main__':
    main()

Verdicts: Wrong Answer

Accepted
Problem: We have a grid with H horizontal rows and W vertical columns. Let (i,j) denote the square at the i-th row from the top and the j-th column from the left.  The square (i, j) has two numbers A_{ij} and B_{ij} written on it.  First, for each square, Takahashi paints one of the written numbers red and the other blue.  Then, he travels from the square (1, 1) to the square (H, W). In one move, he can move from a square (i, j) to the square (i+1, j) or the square (i, j+1). He must not leave the grid.  Let the _unbalancedness_ be the absolute difference of the sum of red numbers and the sum of blue numbers written on the squares along Takahashi's path, including the squares (1, 1) and (H, W).  Takahashi wants to make the unbalancedness as small as possible by appropriately painting the grid and traveling on it.  Find the minimum unbalancedness possible.

Submission attempts (in order):
H, W = map(int, input().split())
A = tuple(tuple(map(int, input().split())) for _ in range(H))
B = tuple(tuple(map(int, input().split())) for _ in range(H))

dp = [[set() for _ in range(W)] for _ in range(H)]
dp[0][0].add(A[0][0] - B[0][0])
dp[0][0].add(B[0][0] - A[0][0])

for i in range(H):
    for j in range(W):
        c = abs(A[i][j]-B[i][j])
        if i > 0:
            dp[i][j] |= {x + c for x in dp[i - 1][j] if x + c <= 200}
            dp[i][j] |= {x - c for x in dp[i - 1][j] if x - c >= -200}
        if j > 0:
            dp[i][j] |= {x + c for x in dp[i][j - 1] if x + c <= 200}
            dp[i][j] |= {x - c for x in dp[i][j - 1] if x - c >= -200}

print(*dp, sep="\n")

import numpy as np
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)

H, W = map(int, input().split())
A = np.array([input().split() for _ in range(H)], dtype=int)
B = np.array([input().split() for _ in range(H)], dtype=int)
dif = np.abs(A - B).tolist()

U = (H + W) * 80
Um = U // 2

dp = [[[] for _ in range(W)] for _ in range(H)]
X = np.zeros(U + 1, dtype=bool)
X[Um + dif[0][0]] = True
X[Um - dif[0][0]] = True
dp[0][0] = X


for i in range(H):
    for j in range(W):
        if i == j == 0:
            continue
        d = dif[i][j]
        X = np.zeros(U + 1, dtype=bool)
        if d:
            if i > 0:
                X[d:] |= dp[i - 1][j][:-d]
                X[:-d] |= dp[i - 1][j][d:]
            if j > 0:
                X[d:] |= dp[i][j - 1][:-d]
                X[:-d] |= dp[i][j - 1][d:]
        else:
            if i > 0:
                X |= dp[i - 1][j]
            if j > 0:
                X |= dp[i][j - 1]
        dp[i][j] = X

tmp = np.arange(U+1)[dp[H-1][W-1]]
ans = np.abs(tmp - Um).min()
print(ans)

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 is_upper(c):
  return ord('A') <= ord(c) and ord(c) <= ord('Z')
def shift(c, k):
  if is_upper(c):
    return chr((ord(c) - ord('A') + k) % 26 + ord('A'))
  else:
    return c
def caesar(s, k):
  return "".join([shift(c, k) for c in s])
N = int(input())
S = input()
enc = caesar(S, N)
print(enc)

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)

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):
l = [SUN, MON, TUE, WED, THU, FRI, SAT]
day = input()
for i in range(len(l)):
  if day = l[i]:
    print(7-i)

l = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
day = input()
for i in range(len(l)):
    if day == l[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):
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)

A,B,X=map(int,input().split())
a=[]
for i in range(1,10):
  rest=X-B*i
  if rest>0 and len(str(int(rest/A)))==i:
      a.append(rest//A)
a.sort()
if a==[]:
    print(0)
else:
    print(a[len(a)-1])

A,B,X=map(int,input().split())
a=[]
for i in range(1,11):
  rest=X-B*i
  if rest>0 and len(str(int(rest/A)))==i:
      a.append(rest//A)
a.sort()
if a==[]:
    print(0)
else:
    print(a[len(a)-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

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 = ""
for m in input():
    s += chr((ord(m)+n-ord("A"))%26+ord("A"))
print(s)

a,b,x = map(int,input().split())
syo = -1
dai = 10**9+1
ans = 0
while abs(dai-syo)!=1:
    n = (dai+syo)//2
    en = a*n+b*len(str(int(n)))
    if en > x:
        dai = n
    else:
        ans = syo = n
print(ans)

d = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-d.index(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):
s = input()
x = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
if s == 'SAT':
    print('SUN')
else:
    print(x[s.index(s) + 1])


s = input()
x = [0, 'SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', 'SUN']
print(x.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):
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)        

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)        

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()
l = ['test','MON','TUE','WED','THU','FRI','SAT','SUN']
print(l.index(s))

s = input()
l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-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):
S = input()
day = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
n = day.index(s)
print(7 - n)

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

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 = s
print (a)
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日後です。")


s = input("曜日を入力してください:")
a = s

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


s = input("曜日を入力してください:")
a = s
print (a)
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")


s = input()
n = int(input())
ans=[]
a = "ABCDEFGHIJKLMNOPQRSTUWVXYZABCDEFGHIJKLMNOPQRSTUWVXYZ"
a_list=[]
for j in a:
	a_list.append(j)
for i in range (len(s)):
	ans.append(a_list[(a_list.index(s[i]))+n])
print("".join(ans))

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

s = input()

print(7-youbi_list.index(s))


Verdicts: Wrong Answer

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):
A, B, X = map(int, input().split())


def is_ok(N):
    return A * N + B * len(str(N)) <= X


ok = 0
ng = 10 ** 9 + 1
while ng - ok > 1:
    m = (ok + ng) // 2
    if is_ok(m):
        ok = m
    else:
        ng = m
print(ok)


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()
if s='SUN':
    print(7)
elif s = 'MON':
    ptint(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):
import sys
input = sys.stdin.readline

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



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)

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):
num_price, digit_price, budget = map(int, input().split())
min_by_digit = {x: int('1'+'0'*x) * num_price + (x+1) * digit_price for x in range(0, 10)}

max_digit = 0
for i in range(0, 10):
    if min_by_digit[i] > budget:
        break
    else:
        max_digit = i+1

if max_digit == 0:
    print("0")
    exit(0)

if max_digit == 10:
    print("1000000000")
    exit(0)

least = int('1'+'0'*(max_digit-1))
ans = min((budget - (digit_price * max_digit)) // num_price, least*10-1)
print(ans)


week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT", ""]
week.reverse()
day = input()
print(week.index(day))


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_of_the_week = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']

n = days_of_the_week.index(s)

if (n == 6):
  print(days_of_the_week[0])
else:
  print(days_of_the_week[n + 1])

s = input()

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

n = days_of_the_week.index(s)

print(7 - days_of_the_week.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):
S = input()
print({
'SUN': 7,
'MON': 6,
'TUE': 5,
'WED': 4,
'THU': 3,
'FRI': 2,
'SAT': 1,
})

S = input()
print({
'SUN': 7,
'MON': 6,
'TUE': 5,
'WED': 4,
'THU': 3,
'FRI': 2,
'SAT': 1,
}[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):
import sys
a,b,x = map(int,input().split())

def bisect(M,m):
    while(abs(M-m)>1):
        mid = (M+m)//2
        if a*mid + b*len(str(mid)) <= x:
            m = mid
        else:
            M = mid
            
    return m
print(bisect(10**9+1,0))

s = input()
l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
i = 7-l.index(s)
print(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):
import math
def undefinedfunction():
  asjdkfl
A,B,X=map(int,input().split())
last=[]
for i in range(0,10):
  last.append(A*(10**i)+B*(i+1))
digit=0
for i in range(0,10):
  if X>=last[i]:
    digit=digit+1
if digit==0:
  print(0)
elif digit>=10:
  undefined
  print(1000000000)
else:
  k=math.floor((X-B*digit)/A)
  if (k+1)*A<=X-B*digit:
    k+=1
    undefinedfunction
  if k<10**(digit-1):
    k=10**(digit-1)
  if k>=10**digit:
    k=10**digit-1
    undefinedfunction
  print(k)

import math
def undefinedfunction():
  asjdkfl
A,B,X=map(int,input().split())
last=[]
for i in range(0,10):
  last.append(A*(10**i)+B*(i+1))
digit=0
for i in range(0,10):
  if X>=last[i]:
    digit=digit+1
if digit==0:
  print(0)
elif digit>=10:
  undefined
  print(1000000000)
else:
  k=math.floor((X-B*(digit-1))/A)
  if (k+1)*A<=X-B*(digit-1):
    k+=1
    undefinedfunction
  if k<10**(digit-1):
    k=10**(digit-1)
  if k>=10**digit:
    k=10**digit-1
    undefinedfunction
  print(k)

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

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):
def solve(string):
    l = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
    return str(7 - l.index(string))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read()))


def solve(string):
    l = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
    return str(7 - l.index(string))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))


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  =  入力（''）

もし S  ==  STR（'SUN' ）：
    プリント（7）
elif  S  ==  str（'MON'）：
    印刷（6）
elif  S  ==  str（'TUE'）：
    プリント（5）
elif  S  ==  str（'WED'）：
    プリント（4）
elif  S  ==  str（'THU'）：
    プリント（3）
elif  S  ==  str（'FRI'）：
    印刷（2）
その他：
    印刷（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):
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):
# get the date as a string
s = input()

WEEKDAYS=['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
integer_day = WEEKDAYS[::-1].indexof(s) + 1
print(integer_day)

# get the date as a string
s = raw_input()

WEEKDAYS=['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
integer_day = WEEKDAYS[::-1].indexof(s) + 1
print(integer_day)

# get the date as a string
s = input()

WEEKDAYS=['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
integer_day = WEEKDAYS[::-1].index(s) + 1
print(integer_day)


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 = 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

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()
week=['SAT','FRI','THU','WED','TUE','MON','SUN']
for i in range(1,7):
    if s==week[i]:
        print(i)

s=input()
week=['SAT','FRI','THU','WED','TUE','MON','SUN']
for i in range(7):
    if s==week[i]:
        print(i+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 = 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 == 'SUT':
    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: 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 an():
    if x>a*1e+9+b*10:
        print(int(1e+9))
        return
    i=int(1e+9)
    j=i
    max=int(1e+9)
    min=1
    while max-min>1:
        d=len(str(i))
        if a*i+b*d>x:
            max=i
        else:
            min=(i+j)//2
        i=(max+min)/2
    print(min)
an()

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

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):
ef main():
    dict = {"SUN": 7,
            "MON": 6,
            "TUE": 5,
            "WED": 4,
            "THU": 3,
            "FRI": 2,
            "SAT": 1,
            }
    day = input()
    ans = dict[day]
    print(ans)



if __name__ == "__main__":
    main()

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



if __name__ == "__main__":
    main()

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 = [1,5,7,15,26,45,60,256] 

x = int(input()) 

li = 0           
ri = len(A) -1   

while (li != ri):       
	mi = (li + ri) // 2 
	if A[mi] < x:       
		li = mi+1       
	elif A[mi] > x:     
		ri = mi-1       
	else:               
		li = mi
		ri = mi
if A[li] == x:
	print("発見！",li)
else:
	print("ないよ！")

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):
week = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7 - index(input()))

week = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7 - week.index(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):
import math
import sys

(A,B,X) = map(int,input().split())


if X < A * 1 + B:
    print(0)
    exit(0)
for i in range(1,10): 
    if X < A * 10**i  + B * (i+1) : 
        print ( (X - B * i)  // A )
        exit(0)

print(10**9)

import math
import sys

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):
import math

A, B, X = map(int, input().split())


L_M = X // A

if L_M < 1:
    print(0)
    exit()

if L_M >= 1 and (X - (int(math.log10(L_M)) + 1) * B) // A > 10 ** 9:
    print(10 ** 9)
    exit()

if L_M >= 1:
    while True:
        if A * L_M + B * (int(math.log10(L_M)) + 1) <= X:
            if L_M > 10 ** 9:
                print(10 ** 9)
            else:
                print(L_M)
            exit()
        elif L_M <= 0:
            print(0)
            exit()
        else:
            L_M -= 1
else:
    print(0)

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):
li=["SUN","MON","TUE","WED","THU","FRI","SAT" ]
day=input()
for i in range(6):
    if(li[i]==day):
        print(7-i)

li=["SUN","MON","TUE","WED","THU","FRI","SAT"]
day=input()
for i in range(7):
    if(li[i]==day):
        print(7-i)

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 = ['SUN','MON','TUE','WED','THUv,'FRI','SAT'].index(input())
print(7 - d)

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

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 = 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 == "SUT":
  a = 1
print(a)

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

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

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):
DAYS = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(DAYS[(DAYS.index(input())+1)%7])

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

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()
arr =  ["SUN","MON","TUE","WED","THU","FRI","SAT","SUN"]

for i,t in enumerate(arr):
  if s == t:
    print(arr[i+1])
    break

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

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

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):
a = input()
b = 0

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

print(b)

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)

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):
STR = input().split()

print(STR)


yobi = ['SUN','MON','TUE','WED','THU','FRI','SAT']
tugi = [7,6,5,4,3,2,1]
S = input()
print(tugi[(yobi.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():
  S = input()
  day = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
  count = 7
  for i in day:
    if S == i:
        print(count)
    i -= 1

if __name__ == '__main__':
  main()


def main():
  S = input()
  day = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
  count = 7
  for i in day:
    if S == i:
        print(count)
    count -= 1

if __name__ == '__main__':
  main()


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

ans = ''

for x in S
	num=(ord(x) + N)
  	if(num >90):
    	num=64+num%90
    ans += chr(num)
print(ans)



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

ans = ''

for x in S
	num=(ord(x) + N)
  	if(num >90):
    	num=64+num%90
    ans += chr(num)
print(ans)



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

ans = ""

for x in range(S)
	num=(ord(x) + N)
  	if(num >90):
    	num=64+num%90
    ans += chr(num)
print(ans)



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

S=input()
print(7-cal[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):
S = input()
week = ["SUN","MON", "TUE", "WED", "THU", "FRI", "SAT"]
for i in week:
  if week[i] == S:
    print(7 - i)

S = input()
week = ["SUN","MON", "TUE", "WED", "THU", "FRI", "SAT"]
for i in range(7):
  if week[i] == S:
    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):
cha=str(input())
if(cha==SUN):
  print(7)
if(cha==SAT):
  print(1)
if(cha==FRI):
  print(2)
if(cha==THR):
  print(3)
if(cha==WED):
  print(4)
if(cha==TUE):
  print(5)
if(cha==MON):
  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: 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):
day = input ("please enter the day")
if day == "SAT" :
    print ("1 \n It is Saturday today, and tomorrow will be Sunday")
elif day == "SUN" :
    print ("7 \n It is Sunday today, and seven days later, it will be Sunday again.")
elif day == "MON" :
    print (" 6 \n It is monday today, and six days later, it will be Sunday again.")
elif day == "TUE" :
    print (" 5 \n It is thusday today, and five days later, it will be Sunday again.")
elif day =="WED" :
    print (" 4 \n It is wednsday today, and four days later, it will be Sunday again.")
elif day == "THU" :
    print ("3 \n It is thusday today, and three days later, it will be Sunday again.")
else:
    print ("2 \n It is friday today, and two days later, it will be Sunday again.")

S = input("Enter The Day: ")
if(S == "SUN"):
    print(7)
elif(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)
else:
    print("Wrong Day Name")

z=['SAT','SUN','MON','TUE','WED','THU','FRI']
x=['Saturday','Sunday','Monday','Tuesday','Wednesday','Thursday','Friday']
b=['tomorrow','two','three','four','five','six','seven']
c=input()
v=z.index('SUN')-z.index(c)
if v <0:
    v=7+v
elif v==0:
     v=7 
print(v)     
print('It is %s today,'%(x[z.index(c)])+'and %s'%(b[v-1]),end='')
if v==1:
    print(' will be Sunday')
else:
    print(' days later, it will be Sunday again')

day = str(input())
day = day.upper()

if (day == 'SAT'):
    print('1\n')
    print('It is Saturday today, and tomorrow will be Sunday.')
elif(day =='SUN'):
    print('7\n')
    print('It is Sunday today, and seven days later, it will be Sunday again.')
elif(day=='MON'):
    print('6\n')
    print('It is Monday today,and sex day later, it will be Sunday again.')
elif(day=='TUE'):
    print('5\n')
    print('It is Tuesday today, and five days later, it will be Sunday again.')    
elif(day=='WED'):
    print('4\n')
    print('It is Wednesday today, and four days later, it will be Sunday again.')    
elif(day=='THU'):
    print('3\n')
    print('It is thursday today, and three days later, it will be Sunday again.')    
elif(day=='FRI'):
    print('2\n')
    print('It is Friday today, and five days later, it will be Sunday again.')
else :
    print('enter again')    
    

s = ['SUN','MON','TUE','WED','THU','FRI','SAT']
day = input()
start = s.index(day)
if day == 'SUN':
    print(7)
else:
    count = 0
    for x in range(7):
        if start == 7:
            start = 0
        if s[start] == 'SUN':
            print(count)
            break
        else:
            start += 1
        count += 1

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted