Problem:


Score : 100 points

Problem Statement

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

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

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

Constraints

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

Input

Input is given from Standard Input in the following format:

S

Output

Print the number of days before the next Sunday.

Sample Input 1

SAT

Sample Output 1

1

It is Saturday today, and tomorrow will be Sunday.

Sample Input 2

SUN

Sample Output 2

7

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



Sample input:
SAT


Sample output:
1

Submission status: Runtime Error

Solution code:
S = int(input('曜日をSUN,MON,TUE,WEN,THU,FRI,SATから入力 >>'))
SUN = 7
MON = 6
TUE = 5
WED = 4
THU = 3
FRI = 2
SAT = 1
print('次の日曜日は{}日後です。'.format{S})

Submission status: Runtime Error

Solution code:
S = int(input('曜日をSUN,MON,TUE,WEN,THU,FRI,SATから入力 >>'))
SUN = 7
MON = 6
TUE = 5
WEN = 4
THU = 3
FRI = 2
SAT = 1
print('次の日曜日は{}日後です。'.format{S})

Submission status: Runtime Error

Solution code:
S = input('曜日をSUN,MON,TUE,WEN,THU,FRI,SATから入力 >>')
SUN = 7
MON = 6
TUE = 5
WEN = 4
THU = 3
FRI = 2
SAT = 1
print('{}'.format{S})

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
s.upper()
week=['sun','mon','tue','wed','thu','fri','sat']
ans=week.index(s)
print(7-ans)

Submission status: Runtime Error

Solution code:
#２分探索
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 #中央のindexの計算
	if A[mi] < x:       #もし中央の値 < x ならば
		li = mi+1       #左半分を消去
	elif A[mi] > x:     #もし中央の値 > x　ならば
		ri = mi-1       #右半分消去
	else:               #xを発見！!(*´꒳`*)!!
		li = mi
		ri = mi
if A[li] == x:
	print("発見！",li)
else:
	print("ないよ！")

Submission status: Runtime Error

Solution code:
W = ["SUM", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
S = input()
print(len(W) - W.index(S))

Submission status: Runtime Error

Solution code:
S = input()

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

Submission status: Runtime Error

Solution code:
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('間違ってます')

Submission status: Runtime Error

Solution code:
S = input()

if S = 'MON':
    print("6")

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

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

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

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

elif S = 'SAT':
    print("1")

elif S = 'SUN':
    print("7")

Submission status: Runtime Error

Solution code:
def main():
    a, b, x = map(int, input().split())
    print(bi(a, b, x))


def f(a, b, n):
    return a * n + b * len(str(n))


def bi(a: int, b: int, x: int) -> int:
    i = 1
    j = min(10 ** 9, x)

    if f(a, b, i) > x:
        return 0
    if f(a, b, j) <= x:
        return j

    ret = 0
    while True:
        p = (i + j) // 2
        if f(a, b, p) < x:
            i = p
        else:
            j = p

        if i + 1 == j:
            if f(a, b, j) <= x:
                ret = j
            else:
                ret = i
            break

    return ret


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
SUN = 7
MON = 1
TUE = 2
WED = 3
THU = 4
FRI = 5
SAT = 6

A =  input()


print(7 - A)

Submission status: Runtime Error

Solution code:
S = input (　)

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

Submission status: Runtime Error

Solution code:
S = input (　)

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

Submission status: Runtime Error

Solution code:
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）

Submission status: Runtime Error

Solution code:
# 146A
S = input()

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


print(answer)

Submission status: Runtime Error

Solution code:
# 今日の曜日を表す文字列 Sが与えられます。
# Sは SUN,MON,TUE,WED,THU,FRI,SAT のいずれかであり、
# それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金曜日、土曜日を表します。
# 次の日曜日 (あす以降) が何日後か求めてください。

# 標準入力から曜日（S）を取得する
input_weekday = input()

# 次の日曜日はあと何日後かを計算して出力する
resut = 0
if input_weekday == 'SUN':
    result = 7
elif input_weekday == 'MON':
    result = 6
elif input_weekday == 'TUE':
    result = 5
elif input_weekday == 'WED':
    resut = 4
elif input_weekday == 'THU':
    result = 3
elif input_weekday == 'FRI':
    resut = 2
elif input_weekday == 'SAT':
    result = 1

print(result)

Submission status: Runtime Error

Solution code:
# 166A
# 問題文
# AtCoder 社は、毎週土曜日にコンテストを開催しています。
# コンテストには ABC と ARC の
# 2つの種類があり、毎週どちらか一方が開催されます。
# ABC が開催された次の週には ARC が開催され、ARC が行われた次の週には ABC が開催されます。
# 先週開催されたコンテストを表す文字列 Sが与えられるので、
# 今週開催されるコンテストを表す文字列を出力してください。
#
# 制約: Sは ABC または ARC
# 入力: 入力は以下の形式で標準入力から与えられる。
#  S
# 出力: 今週開催されるコンテストを表す文字列を出力せよ。

# ABC or ARC
S = input()

if S == 'ABC':
    answer = 'ARC'
elif S == 'ARC':
    answer = 'ABC'

print(answer)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
# 今日の曜日を表す文字列 S が与えられます。
# Sは SUN,MON,TUE,WED,THU,FRI,SAT のいずれかであり、
# それぞれ日曜日、月曜日、火曜日、水曜日、木曜日、金曜日、土曜日を表します。
# 次の日曜日 (あす以降) が何日後か求めてください。

# 入力: 入力は以下の形式で標準入力から与えられる。
# S
# 出力: 次の日曜日が何日後か出力せよ。

week = input()
if week == 'SAT':
    result = 1
elif week == 'FRI':
    result = 2
elif week == 'THU':
    result = 3
elif week == 'WED':
    result = 4
elif week == 'TUS':
    result = 5
elif week == 'MON':
    result = 6
elif week == 'SUN':
    result = 7

print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#何曜日かを入力
weekday = input()
#日曜日までの日数を出力
if weekday == "SUN":
    print(7)
elif weekday == "MON":
    print(6)S
elif weekday == "TUE":
    print(5)
elif weekday == "WED":
    print(4)
elif weekday == "THU":
    print(3)
elif weekday == "FRI":
    print(2)
elif weekday == "SAT":
    print(1)

Submission status: Runtime Error

Solution code:
S = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

DAY = ["SUN","MON","TUE","WED","THU","FRY","SAT"]

print(7-DAY.index(S))

Submission status: Runtime Error

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

for i in range(1, 7):
  if y = youbi[i]:
    print(7-i)

Submission status: Runtime Error

Solution code:
A,B,X=map(int,input().split())
def T(i):
	return A*i+B*len(str(i))<=X
r,l=0,10**9+1
while r+1<l:
  mid=(r+l)//2
  if T(mid)==1:
    r=mid
  else:
    l=mid
print(mid)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
l=0
r=1000000001

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

while l < r-1:
  p = (l+r-1)//2
  c = a*p + b*len(str(p))
  
  if c > x:
    r=p
  else:
    l=p

print(l)

Submission status: Runtime Error

Solution code:
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
A = list(map(int,readline().split()))
B = list(map(int,readline().split()))
N, W = map(int, readline().split())
SS = ['SUN','MON','TUE','WED','THU','FRI','SAT']
S = readline().decode().rstrip()
for i in range(7):
    if S == SS[i]:
        print(7-i)
        sys.exit()

Submission status: Runtime Error

Solution code:
A = input()

S = [SUN,MON,TUE,WED,THU,FRI,SAT]

for i in range(7):
  if A == S[i]:
    print(7-i)
    break
  i+=1

Submission status: Runtime Error

Solution code:
#!/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)

Submission status: Runtime Error

Solution code:
s = input()

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

print(dict[s])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
d='SUN,MON,TUE,WED,THU,FRI,SAT'.split(',')
s=input()
print(7 - d.find(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
d = {"SUN":7,"MON":6,"TUE":5,"WEN":4,"THU":3,"FRI":2,"SAT":1}

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

Submission status: Runtime Error

Solution code:
d = {"SUN":7,"MON":6,"TUE":5,"WEN":4,"THU":3,"FRI":2,"STR":1}

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
d = dict(zip( ['MON', 'TUE', 'WED', 'THUR', 'FRI', 'SAT', 'SUN'], '6543217'))
s = input()
print(d[s])

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
void sunday(string s)
{
    if(s == "SUN")
        cout<<7;
    else if(s == "MON")
        cout<<6;
    else if(s == "TUE")
        cout<<5;
    else if(s == "WED")
        cout<<4;
    else if(s == "THU")
        cout<<3;
    else if(s == "FRI")
        cout<<2;
    else if(s == "SAT")
        cout<<1;
}
int main()
{
    string s;
    cin>>s;
    sunday(s);
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

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

if __name__ == "main":
  if S == "SUN":
    return 7
  else:
    return 7 - week[S]

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
weekdays = ["", "SAT", "FRI", "THU", "WED","TUE","MON", "SUN"]
w = input()
print(weedays.index(w))

Submission status: Runtime Error

Solution code:
weekdays = ["", "SAT", "FRI", "THU", "WED","TUE","MON", "SUN"]
w = input()
print(weedays.find(w))

Submission status: Runtime Error

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

left = 0
right = 1000000000
s = 0
c = (right + left) // 2
ans1 = 0
ans2 = 0
while (right - left) != 1:
    c = (right + left) // 2
    s = a * c + b * len(str(c))
    if s >= x:
        right = c
    else:
        left = c+1

    print(left,c,right)

ans1 = a * left + b * len(str(left))
ans2 = a * right + b * len(str(right))
if ans2 < x:
    print(right)
else:
    print(left)

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int,input().split())

if a + b > x:
    print(0)
    exit()

max_n = math.ceil(x/a)
num = max_n

price = a*num + b * len(str(num))
num_2 = 0
while price > x:

    if price - x > 0 and a < b:
        num_2 = 10**(len(str(num))-1) -1

        sub = (price-x)//a
        if sub != 0:
            num = num - sub
        else:
            num -= 1
        num = max(num,num_2)

    elif price - x > 0:
        sub = (price-x)//a
        if sub != 0:
            num = num - sub
        else:
            num -= 1

    price = a*num + b * len(str(num))

print(min(num,10**9))

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int,input().split())

#s = str(n)
#price = a*n + b*len(s)
if a > x or b> x or a+b > x:
    print(0)
    exit()



max_n = math.ceil(x/a)
num = max_n

price = a*num + b * len(str(num))
num_2 = 0
while price > x:

    if price - x > b and a < b:
        num_2 = 10**(len(str(num))-1) -1

        sub = (price-x)//a
        if sub != 0:
            num = num - sub
        else:
            num -= 1
        num = max(num,num_2)



    elif price - x > 0:
        sub = (price-x)//a
        if sub != 0:
            num = num - sub
        else:
            num -= 1

    price = a*num + b * len(str(num))

print(min(num,10**9))

Submission status: Runtime Error

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

left = 0
right = 10**9 + 1

while (right - left > 1):
  mid = (left + right ) // 2
  if (a*mid+b*len(str(mid))) > x:
    right = mid
  else:
    left = mid
print(left)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
for i, j in enumerate(y):
    if s == j:
        print(7-i)

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())
keta = 0
for i in range(1,24):
    cx = x - b*(i)
    if cx < a*(10**(i-1)):
        keta = i-1
        break
if keta == 0:
    print(0)
elif keta >= 10:
    t = len(cx//a)
    print(10**9)
else:
    cx = x - keta*b
    if cx//a >= 10**9:
        print(10**9)
    else:
        if len(cx//a) > keta:
            print(10**(keta)-1)
        else:
            print(cx//a)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in rangr(7):
  if l[i] ==s
    print(7-i)

Submission status: Runtime Error

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

print(7 - A[date])

Submission status: Runtime Error

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

print(7 - dic[date])

Submission status: Runtime Error

Solution code:
dic ={"SUN":0, "SAT":6, "FRI":5, "TUE":4, "WED":3, "THU":2, "FRI":1}

print(7 - dic[input()])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = [ 'SAT', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SUN']
print(s[i+1])

Submission status: Runtime Error

Solution code:
import java.util.*;
import java.io.*;
 
public class Main { //クラス名はMain
    public static void main(String[] args) {
        //コード
      	Scanner sc = new Scanner(System.in);
      	String[] week = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
      	
      	String str = sc.next();
      
      	for (int i = 0; i < 7; i++) {
          	if(week[i].equals(str)) {
              	System.out.println(7-i);
              	System.exit(0);
            }
        }
    }
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()


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

Submission status: Runtime Error

Solution code:
a = input()

if a == "SUN":
  print(0)
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)
else a  == "sat":
  print(1)

Submission status: Runtime Error

Solution code:
 input()
 
if s == 'SUN':
  print(0)
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:
  pass

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()

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

idx = -1
for w in weekday:
  if w == s:
    idx = w

print(7 - idx)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, x = list(map(int,input().split()))
low = 0
high = x
while high - low > 1:
    mid = (low + high) // 2
    if a * mid + b * len(str(mid)) <= x:
        low = mid
    else:
        high = mid
print(min(low, 10**9))

Submission status: Runtime Error

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

for n in range(int(x / a), 10**9 + 1):
  if x >= a * n + b * len(str(n)):
    continue;
  else:
    break;
  
print(n - 1)

Submission status: Runtime Error

Solution code:
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))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
A =['SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON','SUN']
for i in range(1, 8):
  if A[i] == S:
    print(i)
    break

Submission status: Runtime Error

Solution code:
a,b,x=map(int,input().split())
n=0
moji=str(n)
y=len(moji)
money=a*n+b*y
while money<=x:
  n=n+1
  moji=str(n)
  y=len(moji)
  money=a*n+b*y
print(n-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    A, B, X = map(int, input().split())
    if X >= A*pow(10,9) + B*10:
        print(pow(10, 9))
        return
    ans = 0
    for n in range(10):
        N = (X - B*n) // A
        #print('N:{}, n:{}'.format(N, n))
        ans = max(ans, min(N, pow(10, n)-1))
 
    print(ans)
 
 
if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(day.index(S)]

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

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

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

S = str(input())

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

for i in range(8):
  if S == l[i]:
    print(i)

Submission status: Runtime Error

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

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

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

S = input()

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

for i in range(7):
  if S == l[i]:
    print(i)

Submission status: Runtime Error

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# ~/PycharmProjects/atcoder/C-BuyAnInteger.py
#
a, b, x = map(int, input().split())
xa = x//a
bx = b*len(str(x))


if xa - bx >= 10**9:
    print(10**9)
    exit()

if xa == 0:
    print(0)
    exit()

min_int = max(0, xa - bx)
max_int = xa

while max_int-min_int > 1:
    mid = (min_int + max_int)//2
    # print(mid)
    if x >= a*mid + b * len(str(mid)):
        min_int = mid
    else:
        max_int = mid
print(min_int)

Submission status: Runtime Error

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    a,b,x=map(int,input().split())
    if a+b>x:
        print(0)
        sys.exit()
    for i in range(9,0,-1):#d(N)
        if x-b*i<a*10**(i-1):
            continue
        print(min(10**9,(x-b*i)//a))
        sys.exit()

if __name__=='__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
day = ['SUN', 'MON','TUE','WED','THU','FRI','SAT']
s = input()
for x in range(len(day)):
    if day[x] == s:
        print(7 - x)
        sys.exit()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(7-index(input()))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
    S = input()

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