Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02699 (python)

Fixed submission:
#入力
S, W = map(int, input().split())

if W >= S:
    print("unsafe")
else:
    print("safe")

Buggy submission (verdict: Runtime Error):
N = int(input())
#景品リスト作成
keihin = []

#かぶってなければ箱へ
for i in range(N):
    if keihin.count(input()) == 0:
        keihin.append(input())

#出力
print(len(keihin))

Buggy submission (verdict: Runtime Error):
#入力
HPlist = list(map(int, input().split()))
HPlist[0] = A
HPlist[1] = B
HPlist[2] = C
HPlist[3] = D

int aokiDeath
int takahashiDeath

#高橋の攻撃何発分か
if C % B == 0:
    aokiDeath = C // B
else:
    aokiDeath = C // B + 1 

#青木の攻撃何回分か
if A % D == 0:
    takahashiDeath = A // D
else:
    takahashiDeath = A // D + 1

if aokiDeath <= takahashiDeath:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
#入力
HPlist = list(map(int, input().split()))
HPlist[0] = A
HPlist[1] = B
HPlist[2] = C
HPlist[3] = D


#高橋の攻撃何発分か
if C % B == 0:
    aokiDeath = C // B
else:
    aokiDeath = C // B + 1 

#青木の攻撃何回分か
if A % D == 0:
    takahashiDeath = A // D
else:
    takahashiDeath = A // D + 1

if aokiDeath <= takahashiDeath:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
#入力
A, B, C, D = map(int, input().split())


#高橋の攻撃何発分か
if C % B == 0:
    aokiDeath = C // B
else:
    aokiDeath = C // B + 1 

#青木の攻撃何回分か
if A % D == 0:
    takahashiDeath = A // D
else:
    takahashiDeath = A // D + 1

if aokiDeath <= takahashiDeath:
    print("Yes")
else:
    print("No")
Problem p02701 (python)

Fixed submission:
N = int(input())
S = [str(input()) for _ in range(N)]

S.sort()

count = 1

for i in range(N-1):
    if S[i] != S[i+1]:
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
N = int(input())
#景品リスト作成
keihin = []

#かぶってなければ箱へ
for i in range(N):
    if keihin.count(input()) == 0:
        keihin.append(input())

#出力
print(len(keihin))
Problem p02771 (python)

Fixed submission:
A, B, C = map(int, input().split())

if (A == B and B == C) or (A != B and B != C and C != A):
    print("No")

else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())

if (A = B and B = C) or (A != B and B != C and C != A):
    print("No")

else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input())

if (A = B and B = C) or (A != B and B != C and C != A):
    print("No")

else:
    print("Yes")
Problem p02623 (python)

Fixed submission:
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

na, nb = [0], [0]
for i in range(n):
    na.append(na[i] + a[i])
for j in range(m):
    nb.append(nb[j] + b[j])

ans, j = 0, m
for i in range(n + 1):
    if na[i] > k:
        break
    while nb[j] > k - na[i]:
        j -= 1
    ans = max(ans, i + j)
    
print(ans)

Buggy submission (verdict: Runtime Error):
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

na, nb = [0], [0]
for i in range(n):
    na.append(na[i] + a[i])
for j in range(m):
    nb.append(nb[i] + b[i])

ans, j = 0, m
for i in range(n + 1):
    if na[i] > k:
        break
    while nb[j] > k - na[i]:
        j -= 1
    ans = max(ans, i + j)
    
print(ans)

Buggy submission (verdict: Runtime Error):
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

na, nb = [0], [0]
for i in range(n):
    na.append(na[i] + a[i])
for j in range(m):
    nb.append(nb[i] + b[i])

ans, j = 0, m
for i in range(n + 1):
    if a[i] > k:
        break
    while b[j] > k - a[i]:
        j -= 1
    ans = max(ans, i + j)
    
print(ans)

Buggy submission (verdict: Runtime Error):
from collections import deque

n, m, k = map(int, input().split())
a = deque(map(int, input().split()))
b = deque(map(int, input().split()))

a.append(10 ** 10)
b.append(10 ** 10)
na = a.popleft()
nb = b.popleft()

cnt = 0
min = 0
while min <= k:
    if na <= nb:
        cnt += 1
        min += na
        na = a.popleft()
    elif na > nb:
        cnt += 1
        min += nb
        nb = b.popleft()
    elif na == 10 ** 10 and nb == 10 ** 10:
        cnt += 1
        break
print(cnt-1)
Problem p02729 (python)

Fixed submission:
N,M = map(int, input().split())
print(int((N * (N - 1) / 2 ) + (M * (M - 1) / 2 )))

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
print()(n * (n - 1) / 2) + (m * (m - 1) / 2))
Problem p02753 (python)

Fixed submission:
S = input()
if S[0] == S[1] and S[1] == S[2]:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
s = input()

if s[0] == s[1] and s[2] == s[3] and s[3] == s[1]:
    print('No')
else:
    print('Yes')
Problem p02831 (python)

Fixed submission:
import fractions

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

print(a * b // fractions.gcd(a, b))

Buggy submission (verdict: Runtime Error):
import math

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

print(a * b // math.gcd(a, b))

Buggy submission (verdict: Runtime Error):
import math

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

print(a * b // math.gcd(a, b))
Problem p02835 (python)

Fixed submission:
a = list(map(int, input().split()))

if sum(a) >= 22:
    print('bust')
else:
    print('win')

Buggy submission (verdict: Runtime Error):
a = list(map9int, input().split())

if sum(a) >= 22:
    print('bust')
else:
    print('win')
Problem p02880 (python)

Fixed submission:
n = int(input())

a = []
for i in range(1, 10):
    for j in range(1, 10):
        a.append(i * j)

if n in a:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = int(input().split())

a = []
for i in range(1, 10):
    for j in range(1, 10):
        a.append(i * j)

if n in a:
    print('Yes')
else:
    print('No')
Problem p02933 (python)

Fixed submission:
a = int(input())
s = input()

if a >= 3200:
  print(s)
else:
  print('red')

Buggy submission (verdict: Runtime Error):
a = int(input())
s = input()

if a >= 3200:
  print(s)
 else:
  print('red')
Problem p03041 (python)

Fixed submission:
n, k = map(int, input().split())
s = list(input())

if s[k-1] == 'A':
    s[k-1] = 'a'
elif s[k-1] == 'B':
    s[k-1] = 'b'
else:
    s[k-1] = 'c'

print(''.join(s))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = input()

if s[k-1] == 'A':
    s[k-1] = 'a'
elif s[k-1] == 'B':
    s[k-1] = 'b'
else:
    s[k-1] = 'c'
Problem p03042 (python)

Fixed submission:
s = input()

f = (0 < int(s[:2]) < 13)
s = (0 < int(s[2:]) < 13)
ans = 'NA'
if f and s:
    ans = 'AMBIGUOUS'
elif s:
    ans = 'YYMM'
elif f:
    ans = 'MMYY'
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
if s[:2] == '00' or s[2:] == '00':
    print('NA')
elif s[:2] > 12 and 0 <= s[2:] <= 12:
    print('YYMM')
elif 0 <= s[:2] <= 12 and 0 <= s[2:] <= 12:
    print('AMBIGUOUS')
else:
    print('MMYY')
Problem p03053 (python)

Fixed submission:
from collections import deque

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

q = deque([])
for i in range(h):
    for j in range(w):
        if a[i][j] == '#':
            q.append([i, j])
            q.append(0)

while q:
    y, x = q.popleft()
    ans = q.popleft() + 1
    for dy, dx in [[1, 0], [0, 1], [-1, 0], [0, -1]]:
        ny, nx = dy + y, dx + x
        if ny < 0 or nx < 0 or ny >= h or nx >= w:
            continue
        if a[ny][nx] == '.':
            a[ny][nx] = '#'
            q.append([ny, nx])
            q.append(ans)

print(ans-1)

Buggy submission (verdict: Runtime Error):
import numpy as np
import heapq as hp

h, w = map(int, input().split())
a = np.array([list(input()) for _ in range(h)])
a = np.pad(a, 1, 'constant')

q = []
for i in range(h+2):
    for j in range(w+2):
        if a[i][j] == '#':
            hp.heappush(q, (0, i, j))

while q:
    cnt, y, x = hp.heappop(q)
    for dy, dx in [[0, 1], [1, 0], [-1, 0], [0, -1]]:
        ny, nx = dy + y, dx + x
        if a[ny][nx] == '.':
            hp.heappush(q, (cnt + 1, ny, nx))
            a[ny][nx] = '#'
            
print(cnt)
Problem p03835 (python)

Fixed submission:
k, s = map(int, input().split())
count = 0

for x in range(k + 1):
    for y in range(k + 1):
        if (s - x - y >= 0 and s - x - y <= k):
            count += 1

print(count)

Buggy submission (verdict: Runtime Error):
k, s = map(int, input().split())
count = 0

for x in range(k + 1):
    x = i
    for y in range(k + 1):
        if (s - x - y >= 0 and s - x - y <= k):
            count += 1
            
print(count)

Buggy submission (verdict: Runtime Error):
k, s = int(input().split())
count = 0

for i in range(k):
    x = i
    for j in range(k):
        y = j
        for l in range(k):
            z = l
            if x + y + z == s:
                count += 1
print(count)
Problem p02711 (python)

Fixed submission:
n = input()
 
print('Yes' if '7' in n else 'No')

Buggy submission (verdict: Runtime Error):
A=input()
 
if A in "7":
  print("Yes")
  
  else:
  	print("No")

Buggy submission (verdict: Runtime Error):
A=input()

if A in "7":
  print("Yes")

else:
  print("No
")
Problem p03307 (python)

Fixed submission:
n=int(input())
if n%2!=0:
    print(n*2)
else:
    print(n)

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
g=math.gcd(2,n)
print((n*2)//g)

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
g=math.gcd(2,n)
print((n*2)//g)
Problem p03315 (python)

Fixed submission:
n=input()
ans=0
for i in range(0,len(n)):
    if n[i]=='+':
        ans+=1
    else:
        ans-=1
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
ans=n
s=0
while n!=0:
    a=n%10
    s+=a
    n=n//10
if ans%s==0:
    print("Yes")
else:
    print("No")
Problem p02693 (python)

Fixed submission:
k=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
  if i % k == 0:
    print('OK')
    break
else:
  print('NG')

Buggy submission (verdict: Runtime Error):
k=int(input())
a,b=map(input().split())
for i in range(a<b):
	if range(a<b)%k==0:
		print('OK')
    else:
    	print('NG')
Problem p02723 (python)

Fixed submission:
s=input()
if s[2] == s[3] and s[4] == s[5]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s=input()
if s[4] == s[5] and s[6] == s[7]:
  print('Yes')
else:
  print('No')
Problem p03327 (python)

Fixed submission:
N = int(input())

if N < 1000:
  print("ABC")
elif N >= 1000 and N < 1999:
  print("ABD")

Buggy submission (verdict: Runtime Error):
if int(input()) < 1000 :
  print("ABC")
elif 1000 <= int(input()) <1999 :
  print("ABD")
Problem p02622 (python)

Fixed submission:
S = input()
T = input()

n = 0

for a in range(len(S)) :

    if not S[a] == T[a] :
        n += 1

print(n)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

n = 1

for a in range len(S)

if S[a] = T[a] :
    n += 1

return n
Problem p02676 (python)

Fixed submission:
s = int(input())
t = input()

if len(t) <= s:
  print(t)
  
else :
  tt =  t[0:s]
  print(tt + "...")

Buggy submission (verdict: Runtime Error):
s = int(input())
t = input()

if len(t) =< s:
  print(t)
  
else :
  tt =  t[0:s]
  print(tt + "...")

Buggy submission (verdict: Runtime Error):
s = int(input())
t = input()

if len(t) =< s:
  print(t)
  
else :
  tt =  t[0:s]
  print(tt + "...")
Problem p02659 (python)

Fixed submission:
from decimal import Decimal

a,b = map(Decimal,input().split())

print(int(a*b))

Buggy submission (verdict: Runtime Error):
ab = input()
a = int(input.split()[0])
b = float(input.split()[1])
print(int(a*b))
Problem p02695 (python)

Fixed submission:
import itertools

n,m,q = map(int,input().split())

a = [0] * q
b = [0] * q
c = [0] * q
d = [0] * q

for i in range(q):
  a1,b1,c1,d1 = map(int,input().split())
  a[i] = a1
  b[i] = b1
  c[i] = c1
  d[i] = d1

x = itertools.combinations_with_replacement(range(1,m+1),n)
tmp = 0
ans = 0
for xi in x:
  tmp = 0

  for i in range(q):
    if xi[b[i]-1] - xi[a[i]-1] == c[i]:
      tmp += d[i]
  ans = max(ans,tmp)

print(ans)

Buggy submission (verdict: Runtime Error):
#import itertools

n,m,q = map(int,input().split())

abcd = [input() for _ in range(q)]

#x = itertools.product(range(1,m+1),repeat=n)
x = []
for i in range(1,m+1):
  for j in range(i,m+1):
    for k in range(j, m+1):
      for l in range(k,m+1):
        x.append([i,j,k,l])
tmp = 0
ans = 0
for xi in x:
  tmp = 0
  for i in abcd:
    a,b,c,d = map(int,i.split())
    if xi[b-1] - xi[a-1] == c:
      tmp += d
  ans = max(ans,tmp)

print(ans)
Problem p02860 (python)

Fixed submission:
n = int(input())
s = input()

center=int(n/2)

if n%2==0 and s[:center] == s[center:]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n,s = [input() for i in range(n)]

if n%2 == 0 and s[::(n//2-1)] == s[(n//2-1)::]:
  print('Yes')
else:
  print('No')
Problem p02879 (python)

Fixed submission:
i = list(map(int, input().split()))
 #出力：['s_1', 's_2']
A=i[0] #出力：s_1
B=i[1] #出力：s_2

if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
s = int(input()).split() #s_1 s_2を分割して取得し、sに値を入れる
 #出力：['s_1', 's_2']
A=s[0] #出力：s_1
B=s[1] #出力：s_2

if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
s = input().split()
A = s[0]
B = s[1]

if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
s = input().split() #s_1 s_2を分割して取得し、sに値を入れる
 #出力：['s_1', 's_2']
A=s[0] #出力：s_1
B=s[1] #出力：s_2

if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
 
if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
 
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print('-1')

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())

if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print(-1)
Problem p02897 (python)

Fixed submission:
N = input()
1 <= int(N) <= 100

if int(N) % 2 == 0:
  print(float(1/2))

else:
  x = (int(N)+1)/2
  print(float(x/int(N)))

Buggy submission (verdict: Runtime Error):
N = input()
1<= N(int) <=100

if N(int) % 2 ==0:
  print(float(1/2))

else:
  N(int) % 2 !=0:
  x = (N(int)+1)/2
  print(float(x/N(int)))

Buggy submission (verdict: Runtime Error):
N = input()
1<= N(int) <=100

if N(int) % 2 ==0:
  print(float(1/2))

else:
  N(int) % 2 !=0:
  x = N(int) - (N(int)+1)/2
  print(float(x/N(int)))

Buggy submission (verdict: Runtime Error):
1<= N(int) <=100

if N(int) % 2 ==0:
  print(1/2)

else:
  N(int) % 2 !=0:
  x = N(int)- (N(int)+1)/2
  print(x/N(int))

Buggy submission (verdict: Runtime Error):
import random

N = input()
1<= N(int) <=100

if N(int) % 2 ==0:
  print(1/2)

else:
  N(int) % 2 !=0:
  x = N(int)- (N(int)+1)/2
  print(x/N(int))

Buggy submission (verdict: Runtime Error):
N = input()
1<=N(int)<=100

if N(int)%2 != 0:
  print(N(int))
Problem p02915 (python)

Fixed submission:
N =input()
print(int(N)**3)

Buggy submission (verdict: Runtime Error):
N = input()
print(pow(N,3))

Buggy submission (verdict: Runtime Error):
N = input()
print(int(N*N*N))

Buggy submission (verdict: Runtime Error):
input=()
print(N*N*N)

Buggy submission (verdict: Runtime Error):
N = input()
print(N**3)

Buggy submission (verdict: Runtime Error):
N = input()
print(str(N**3))
Problem p02916 (python)

Fixed submission:
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
 
bonus=0
for x in range(1,n):
  if A[x-1]+1 == A[x]:
    bonus += C[A[x]-2]
 
ans = sum(B) + bonus
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

bonus=0
for x in range(0,n):
  if A[x] == A[x+1] +1:
    bonus += C[x]

ans = sum(B) + bonus
print(ans)
Problem p02970 (python)

Fixed submission:
n,d=map(int,input().split())

if n%(2*d+1)!=0:
  print(n//(2*d+1)+1)
else:
  print(n//(2*d+1))

Buggy submission (verdict: Runtime Error):
N,D = map(int, input().split())

num = 0
for i in range(1,N):
    if (D*2+1)<=N:
        i += 1
        break
num=i
print(num)
Problem p03011 (python)

Fixed submission:
p,q,r = [int(i) for i in input().split(' ')]

x = p+q
y = q+r
z = r+p

print(min([x,y,z]))

Buggy submission (verdict: Runtime Error):
p,q,r = [int(x) for x in input().split()]
p,q,r.sort()
answer = p,q,r[0] + p,q,r[1]
print(answer)

Buggy submission (verdict: Runtime Error):
p,q,r = [int(i) for i in input().split(' ')]

l = list(p,q,r)
l.sort()

ans=l[0]+l[1]

print(ans)

Buggy submission (verdict: Runtime Error):
p,q,r = [int(i) for i in input().split(' ')]

l = list(p,q,r)
l.sort()

ans=l[0]+l[1]

print(ans)

Buggy submission (verdict: Runtime Error):
pqr = [int(i) for i in input().split('')]

x = p+q
y = q+r
z = r+p

print(min([x,y,z]))

Buggy submission (verdict: Runtime Error):
p,q,r = [int(i) for i in input().split(' ')]

x= p+q
y= q+r
z= r+z

print(min([x,y,z]))

Buggy submission (verdict: Runtime Error):
p,q,r = [int(i) for i in input().split(' ')]

x= p+q
y= q+r
z= r+z

print(min([x,x,z]))
Problem p03041 (python)

Fixed submission:
n,k = [int(x) for x in input().split()]
s = input()

print(s[:k-1] + s[k-1].lower() + s[k:])

Buggy submission (verdict: Runtime Error):
n,k = [int(x) for x in input().split()]
s = input()

print(s[:k-1] + s[k-1].lower + s[K:])

Buggy submission (verdict: Runtime Error):
n,k = [int(x) for x in input().split()]
s = input()

s[k].lower()

print(s)
Problem p02623 (python)

Fixed submission:
N, M, K = map(int, input().split())
A = [int(s) for s in input().split()]
B = [int(s) for s in input().split()]

time = 0
maxBooks = 0

for i in range(N):
  if K - time >= A[i]:
    time += A[i]
    maxBooks += 1
  else:
    break

A_count = maxBooks - 1
nowBooks = maxBooks

for i in range(M):
  time += B[i]
  nowBooks += 1
  
  while K < time:
    if A_count < 0:
      nowBooks = 0
      break
    time -= A[A_count]
    A_count -= 1
    nowBooks -= 1
      
  if maxBooks < nowBooks:
    maxBooks = nowBooks
    
print(maxBooks)

Buggy submission (verdict: Runtime Error):
N, M, K = map(int, input().split())
A = [int(s) for s in input().split()]
B = [int(s) for s in input().split()]

time = 0
maxBooks = 0
for i in range(N):
  if K - time >= A[i]:
    time += A[i]
    maxBooks += 1
  else:
    break

A_count = maxBooks
nowBooks = maxBooks
flag = True
for i in range(M):
  if K - time >= B[i]:
    time += B[i]
    nowBooks += 1
  else:
    time += B[i]
    nowBooks += 1
    while K < time:
      time -= A[A_count]
      A_count -= 1
      nowBooks -= 1
      if A_count < 0:
        break
    if flag:
      break

  if maxBooks < nowBooks:
    maxBooks = nowBooks
    
print(maxBooks)

Buggy submission (verdict: Runtime Error):
N, M, K = map(int, input().split())
A = [int(s) for s in input().split()]
B = [int(s) for s in input().split()]

time = 0
maxBooks = 0
for i in range(N):
  if K - time >= A[i]:
    time += A[i]
    maxBooks += 1
  else:
    break

A_count = maxBooks
nowBooks = maxBooks

for i in range(M):
  if K - time >= B[i]:
    time += B[i]
    nowBooks += 1
  else:
    if A_count < 0:
      break
    while K - time < B[i]:
      time -= A[A_count]
      A_count -= 1
      nowBooks -= 1
    time += B[i]
    nowBooks += 1
  if maxBooks < nowBooks:
    maxBooks = nowBooks
    
print(maxBooks)
Problem p02623 (python)

Fixed submission:
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

a,b = [0], [0]

for i in range(N):
	a.append(a[i] + A[i])
for i in range(M):
	b.append(b[i] + B[i])

j=M
ans = 0
for i in range(N+1):
	if a[i]>K:
		break
	while K-a[i] < b[j]:
		j-=1
	ans=max(ans,i+j)

print(ans)

Buggy submission (verdict: Runtime Error):
s=0
i=0
j=0
n,m,k=(int(x) for x in input().split())
a=[]
a = list(map(int, input().split()))
b=[]
b = list(map(int, input().split()))

if n<=m:
	l=m
else:
	l=n


for ind in range(0,l):
	if s>k:break;
	if a[i]<=b[j]:
		s+=a[i]
		i=i+1
	else:
		s+=b[j]
		j=j+1



print(i+j-1)
Problem p02847 (python)

Fixed submission:
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)

Buggy submission (verdict: Runtime Error):
S=input()
if S=="MON" :
	print(1)
else if S=="TUE" :
	print(2)
else if S=="WED" :
	print(3)
else if S=="THU" :
	print(4)
else if S=="FRI" :
	print(5)
else if S=="STA" :
	print(6)
else if S=="SUN" :
	print(7)
Problem p02711 (python)

Fixed submission:
a,b,c = input()

if(a=="7" or b=="7" or c=="7"):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,c = input()

if(a=="7"||b=="7"||c=="7"):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,c = input().split()

if(a=="7"||b=="7"||c=="7"):
  print("Yes")
else:
  print("No")
Problem p02753 (python)

Fixed submission:
a,b,c=input()
if a==b and b==c:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
isReversed = False
s = input()
q = int(input())
for i in range(q):
  t = list(input().split())
  if t[0] =='1':
    isReversed = not bool(isReversed)
  else:
    if (t[1] =='1' and isReversed == False) or (t[1] =='2' and isReversed == True) :
      s = t[2] +s
    else:
      s = s + t[2]
                                              
      
if isReversed:
  s = s[::-1]
      
print(s)

Buggy submission (verdict: Runtime Error):
a,b =map(int,input().split())

ans = b * 10
status = ''
for i in range(10):
  8*(ans + i)//100
  if(a == 8*(ans + i)//100):
    ans += i
    status = 'ok'
    break;

if status =='ok':
  print(ans)
  
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
n,a,b =map(int,input().split())
c = a+b

ans = n//c
l = n%c
if a>l:
  ans += l
else:
  ans += a
  
print(ans)

Buggy submission (verdict: Runtime Error):
n,a,b =map(int,input().split())
c = a+b

sum1 = n//c
l = n%c
if a>l:
  sum2 = l
else:
  sum2 = a
  
print(sum1+sum2)

Buggy submission (verdict: Runtime Error):
n,a,b =map(int,input().split())
c = a+b

sum1 = c/n
l = c%n
if a>l:
  sum2 = l
else:
  sum2 = a
  
print(sum1+sum2)

Buggy submission (verdict: Runtime Error):
a,b,c=input()
if a==b and b==C:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
s1,s2,s3 = input()
if(s1==s2 and s2==s3):
  print('NO')
elif:
  print('YES')
Problem p02689 (python)

Fixed submission:
#標準入力

N,M = map(int, input().split())

#[1,1,…,1]というリストを作成する
#最終的に良い展望台の数を和で求めるため、１で始める

good = [1 for i in range(N)]


#標準入力で高さの一覧を取得

height = list(map(int, input().split()))
 
#道の数Mだけ、入力を繰り返す

for i in range(M):
  a,b = map(int, input().split())

#一括で受け取らず、受取→処理をM回繰り返す
#高さのリストと一致させるため-1

  a -= 1
  b -= 1

#２つの高さを比較し、低い方の展望台を、最初のリストで０にする

  if height[a] <= height[b]:
    good[a] = 0

  if height[a] >= height[b]:
    good[b] = 0

#goodリストで「１」のままの展望台は、つながっている道でいけるどの展望台よりも高い

print(sum(good))

Buggy submission (verdict: Runtime Error):
N,K= map(int, input().split())

H = list(map(int, input().split()))

a = [0] * K
b = [0] * K

for i in range(K):
    a[i], b[i],= map(int, input().split())

X = 0

for (j) in range(K):

    if H[j-1] != H[j-1] :
        X += 1

print(X)
Problem p02711 (python)

Fixed submission:
N = str(input())
if "7" in N:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = str(input())

if "7" in N:
  print("Yes")
  
else:
  print("No")ｃ
Problem p02753 (python)

Fixed submission:
N=(input())
if N=="AAA" or N == "BBB":
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
S = input()
N = int(input())
Q =[]
flag = True
while True:
    try:
        Q.append(list(map(str,input().split())))

    except:
        break;

for i in range(N):
    if Q[i][0]=="1":
        flag = not(flag)                
    else: 
        if Q[i][1] == "2" and flag == True:
            S += Q[i][2]#先頭
            
        
        elif Q[i][1] == "2" and flag == False:
            S1 = Q[i][2]+ S
            S = S1
            
        elif Q[i][1] == "1" and flag == True:
            S1 = Q[i][2]+S
            S = S1
            
        elif Q[i][1] == "1" and flag == False:
            S += Q[i][2]

if flag == True:
    print(S)
else:
    print(S[::-1])