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

Fixed submission:
import sys

def gcd(a,b):
    if b==0:
        return a
    return(gcd(b, a%b))

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

N, M = map(int,input().split())
S = input()
T = input()
d = gcd(N,M)
L = lcm(N,M)
for i in range(d):
    if S[i*(N//d)] != T[i*(M//d)]:
        print(-1)
        sys.exit()

print(L)

Buggy submission (verdict: Runtime Error):
def gcd(a,b):
    if b==0:
        return a
    return(gcd(b, a%b))

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

N, M = map(int,input().split())
S = input()
T = input()
L = lcm(N,M)
d1 = L//N
d2 = L//M
d = lcm(d1,d2)
l = list(range(L))
l = l[::d]
b = True
for i in l:
    if S[i//d1] != T[i//d2]:
        print(-1)
        sys.exit()

print(L)

Buggy submission (verdict: Runtime Error):
def gcd(a,b):
    if b==0:
        return a
    return(gcd(b, a%b))

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

N, M = map(int,input().split())
S = input()
T = input()
L = lcm(N,M)
d1 = L//N
d2 = L//M
d = lcm(d1,d2)
l = list(range(L))
l = l[::d]
b = True
for i in l:
    if S[i//d1] != T[i//d2]:
        b = False
        break

if not b:
    L = -1
print(L)

Buggy submission (verdict: Runtime Error):
import math
import pprint

def lcm(a,b):
    return (a*b)//math.gcd(a,b)

N, M = map(int,input().split())
S = input()
T = input()
L = lcm(N,M)
d1 = L//N
d2 = L//M
d = lcm(d1,d2)
l = list(range(L))
l = l[::d]
b = True
for i in l:
    if S[i//d1] != T[i//d2]:
        b = False
        break

if not b:
    L = -1
print(L)
Problem p02999 (python)

Fixed submission:
x,A = map(int,input().split())
if x < A:
    print(0)
else:
    print(10)

Buggy submission (verdict: Runtime Error):
X, A = map(int, input().split())
if x < A:
    print(0)
else:
    print(10)
Problem p03078 (python)

Fixed submission:
x,y,z,k = map(int,input().split())
lisa = list(map(int,input().split()))
lisb = list(map(int,input().split()))
lisc = list(map(int,input().split()))
lisa.sort(reverse=True)
lisb.sort(reverse=True)
lisc.sort(reverse=True)
an = []
ans = []
for num in lisb:
    for nu in lisa:
        an.append(num+nu)
an.sort(reverse=True)
an = an[:min(3001,x*y*z+1)]
for num in lisc:
    for nu in an:
        ans.append(num+nu)
ans.sort(reverse=True)
for i in range(k):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
x,y,z,K = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))

a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)

result = [0]*K**3

ri = 0;
for i in range(min(len(a), K)):
    for j in range(min(len(b), K)):
        for k in range(min(len(c), K)):
            result[ri] = a[i] + b[j] + c[k]
            ri += 1
            
result.sort(reverse=True)

           
for i in range(K):
    print(result[i])
Problem p03087 (python)

Fixed submission:
N,Q = map(int,input().split())	

S = input()

t = [0] * N
for i in range(1, N):
    if S[i-1:i+1] == 'AC':
        t[i] = t[i-1] + 1
    else:
        t[i] = t[i-1]
#    print(t)

for _ in range(Q):
    l,r = map(int,input().split())	
    print(t[r-1]-t[l-1])

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

S = input()

for _ in range(N):
    l,r = map(int,input().split())	
    print(len(re.findall('AC', S[l-1:r])))
Problem p03112 (python)

Fixed submission:
import bisect
A, B, Q = map(int, input().split())
INF = 10 ** 18
s = [-INF] + [int(input()) for i in range(A)] + [INF]
t = [-INF] + [int(input()) for i in range(B)] + [INF]
for q in range(Q):
    x = int(input())
    b, d = bisect.bisect_right(s, x), bisect.bisect_right(t, x)
    res = INF
    for S in [s[b - 1], s[b]]:
        for T in [t[d - 1], t[d]]:
            d1, d2 = abs(S - x) + abs(T - S), abs(T - x) + abs(S - T)
            res = min(res, d1, d2)
    print(res)

Buggy submission (verdict: Runtime Error):
r i in range(A):
    S.append(int(input()))

S = [-INF] + S + [INF]

T = []
for i in range(B):
    T.append(int(input()))

T = [-INF] + T + [INF]


for i in range(Q):
    x = int(input())
    
    d, b = bisect.bisect_right(S, x), bisect.bisect_right(T, x)
    
    res = INF
    for s in [S[d - 1], S[d]]:
        for t in [T[b - 1], T[b]]:
            res = min(res, 
                      abs(s - x) + abs(s - t),
                      abs(t - x) + abs(s - t))
            
    print(res)
Problem p02991 (python)

Fixed submission:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,M,*UV,S,T = map(int,read().split())

it = iter(UV)
G = [[] for _ in range(1+N+N+N)]
for x, y in zip(it, it):
    x1=x+N; x2=x1+N;
    y1=y+N; y2=y1+N;
    G[x].append(y1)
    G[x1].append(y2)
    G[x2].append(y)

INF = 10 ** 15
dist = [INF] * (N+N+N+1)
dist[S] = 0
q = [S]
while q:
    qq = []
    for x in q:
        for y in G[x]:
            if dist[y] != INF:
                continue
            qq.append(y)
            dist[y] = dist[x] + 1
            if y == T:
                break
    q = qq

d = dist[T]

answer = -1 if d == INF else d//3
print(answer)

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, M, *UV, S, T = map(int, read().split())

it = iter(UV)
G = [[] for _ in range(1+N+N+N)]
for x, y = in zip(it, it):
    x1 = x + N; x2 = x1 + N;
    y1 = y + N; y2 = y1 + N;
    G[x].append(y1)
    G[x1].append(y2)
    G[x2].append(y)

INF = 10 ** 15
dist = [INF] * (N + N + N + 1)
dist[S] = 0
q = [S]
while q:
    qq = []
    for x in q:
        for y in G[x]:
            if dist[y] != INF:
                continue
            qq.append(y)
            dist[y] = dist[x] + 1
            if y == T:
                break
    q = qq

d = dist[T]

answer = -1 if d == INF else d//3
print(answer)
Problem p02988 (python)

Fixed submission:
n = int(input())
p_list = list(map(int, input().split()))
count = 0
for i in range(len(p_list)-2):
	if (p_list[i]<p_list[i+1] and p_list[i+1]<p_list[i+2]) or (p_list[i]>p_list[i+1] and p_list[i+1]>p_list[i+2]):
		count += 1
print(count)

Buggy submission (verdict: Runtime Error):
    n = int(input())
    p_list = list(map(int, input().split()))
    count = 0
    for i in range(len(p_list)-2):
    	if (p_list[i]<p_list[i+1] and p_list[i+1]<p_list[i+2]) or (p_list[i]>p_list[i+1] and p_list[i+1]>p_list[i+2]):
    		count += 1
    print(count)
Problem p02988 (python)

Fixed submission:
def myInput():
  n = input()
  s = input()
  return (n, [int(i) for i in s.split()])

def func():
  n, lst1 = myInput()
  cnt = 0
  for i in range(1, int(n)-1):
    if min(lst1[i+1],max(lst1[i], lst1[i-1])) == lst1[i]:
      cnt+=1
    elif min(lst1[i-1],max(lst1[i],lst1[i+1])) == lst1[i]:
      cnt += 1
  return cnt
print(func())

Buggy submission (verdict: Runtime Error):
def myInput():
  n=input()
  s=input()
  return(n,[int(i) for i in s.split()])

def func():
  n, lst1 = nyInput()
  cnt = 0
  for i in range(1, int(n)-1):
    if min(lst[i+1],max(lst1[i],lst1[i-1])) == lst1[i]:
      cnt+=1
    elif min(lst1[i-1], max(lst1[i],lst1[i+1])) == lst1[i]:
      cnt+=1
  return cnt
print(func())
Problem p02995 (python)

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

lcm = C*D//fractions.gcd(C, D)

a_cnt = (A -1) - (((A - 1) // C) + ((A - 1) // D) - ((A - 1) // (lcm)))
b_cnt = B - ((B // C) + (B // D) - (B // (lcm)))

print(b_cnt - a_cnt)

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

lcm = C*D//math.gcd(C, D)

a_cnt = (A -1) - (((A - 1) // C) + ((A - 1) // D) - ((A - 1) // (lcm)))
b_cnt = B - ((B // C) + (B // D) - (B // (lcm)))

print(b_cnt - a_cnt)
Problem p03359 (python)

Fixed submission:
# -*- coding: utf-8 -*-

def main():
    a, b = map(int, raw_input().split())

    if a <= b:
        print(a)
    else:
        print(a-1)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

def main():
    h, w = map(int, raw_input().split())

    square = []
    for i in range(h):
        square.append(raw_input())

    for i in range(h):
        for j in range(w):
            if square[i][j] == '.':
                continue
            else:
                if check(square, i, j, h, w):
                    continue
                else:
                    print("No")
                    exit()

    print("Yes")

def check(square, i, j, h, w):
    if i-1 >= 0:
        if square[i-1][j] == '#':
            return True
    if i+1 < h:
        if square[i+1][j] == '#':
            return True
    if j-1 >= 0:
        if square[i][j-1] == '#':
            return True
    if j+1 < w:
        if square[i][j+1] == '#':
            return True

    return False

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

def main():
    h, w = map(int, raw_input().split())

    square = []
    for i in range(h):
        square.append(raw_input())

    for i in range(h):
        for j in range(w):
            if square[i][j] == '.':
                continue
            else:
                if check(square, i, j, h, w):
                    continue
                else:
                    print("No")
                    exit()

    print("Yes")

def check(square, i, j, h, w):
    if i-1 >= 0:
        if square[i-1][j] == '#':
            return True
    if i+1 < h:
        if square[i+1][j] == '#':
            return True
    if j-1 >= 0:
        if square[i][j-1] == '#':
            return True
    if j+1 < w:
        if square[i][j+1] == '#':
            return True

    return False

if __name__ == '__main__':
    main()
Problem p02988 (python)

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

ans=0

for i in range(N-2):
  if L[i] < L[i+1] and  L[i+1] < L[i+2]:
    ans +=1 
  if L[i] > L[i+1] and  L[i+1] > L[i+2]:
    ans +=1 
  else:
    pass

print(ans)

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

ans = 0
for i in range(N-2):
  if list[i+1] > List[i] and list[i+1] < List[i+2]:
    ans+=1
  if list[i+1] < List[i] and list[i+1] > List[i+2]:
    ans+=1
  else:
    pass

print(ans)

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

ans = 0
for i in range(N-2):
  if list[i+1] > List[i] and list[i-1] < List[i]:
    ans+=1
  if list[i+1] < List[i] and list[i-1] > List[i]:
     ans+=1

print(ans)
Problem p02996 (python)

Fixed submission:
n=int(input())
bag=[]
ans="Yes"
total=0
for i in range(n):
    a,b=map(int,input().split())
    bag.append([a,b])
d=sorted(bag, key=lambda x:x[1])

for j in range(n):
    total=total+d[j][0]
    if total>d[j][1]:
        ans="No"
        break

print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
d=[]
judge=True
bag=[]
for i in range(n):
    a,b=map(int,input().split())
    d.append([a,b])
d.sort(key=itemgetter(1))
        
for j in range(len(d)):
    bag.append(d[j][0])
    if sum(bag)>d[j][1]:
        judge=False
else:
    if judge==True:
        print("Yes")
    else:
        print("No")
Problem p03000 (python)

Fixed submission:
n,x=map(int,input().split())
L=list(map(int,input().split()))
d=0
c=0
for i in range(1,n+2):
    if d<=x:
        c+=1
    if i<n+1:
        d=d+L[i-1]
print(c)

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
L=list(map(int,input().split()))
d=0
c=0
for i in range(1,n+2):
    if d<=x:
        c+=1
    d=d+L[i-1]
print(c)
Problem p03071 (python)

Fixed submission:
nm = [int(n) for n in input().split()];nm.extend([n-1 for n in nm]);nm.sort();nm.reverse();print(sum(nm[:2]));

Buggy submission (verdict: Runtime Error):
print(sum([max([int(n) for n in input().strip().split()])-a for a in [0,1]]))
Problem p03206 (python)

Fixed submission:
print(("Christmas "+((25-(int(input())))*"Eve ")).strip())

Buggy submission (verdict: Runtime Error):
("Christmas " + (25 - (int(input())) * "Eve ")).strip()
Problem p03000 (python)

Fixed submission:
s=input().split()
n=int(s[0])
x=int(s[1])
j=[]
d=input().split()
for i in range(n):
    j.append(int(d[i]))
d= 0
i=0
p=0
while d<=x:
    p+=1
    if i<=len(j)-1:
        d+=j[i]
    else:
        break
    i+=1
print(p)

Buggy submission (verdict: Runtime Error):
s=input().split()
n=int(s[0])
x=int(s[1])
j=[]
d=input().split()
for i in range(n):
    j.append(int(d[i]))
d= 0
i=0
p=0
while d<=x:
    p+=1
    d+=j[i]
    i+=1
print(p)
Problem p03415 (python)

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

slice1 = s[0:1]
slice2 = t[1:2]
slice3 = u[2:3]

ans = slice1 + slice2 + slice3

print(ans)

Buggy submission (verdict: Runtime Error):
i = list(map(int, input().split()))
A = i[0]
B = i[1]

count = 0
for i in range (A,B+1,1):
    I = str(i)
    if int(I[-1]) == int(I[-5]) and int(I[-2]) == int(I[-4]):
        count = count + 1
    else :
        pass

print(count)
Problem p03416 (python)

Fixed submission:
i = list(map(int, input().split()))
A = i[0]
B = i[1]

count = 0
for i in range (A,B+1,1):
    I = str(i)
    if int(I[-1]) == int(I[-5]) and int(I[-2]) == int(I[-4]):
        count = count + 1
    else :
        pass

print(count)

Buggy submission (verdict: Runtime Error):
i = list(map(int, input().split()))
A = i[0]
B = i[1]

count = 0
for i in range (A-1,B+1,1):
    I = str(i)
    if int(I[-1]) == int(I[-5]) and int(I[-2]) == int(I[-4]):
        count = count + 1
    else :
        pass

print(count)

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

count = 0
for i in range (A,B,1):
    I = str(i)
    if int(I[-1]) == int(I[-5]) and int(I[-2]) == int(I[-4]):
        count = count + 1
    else :
        pass

print(count)

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

a = str(A)
b = str(B)

count = 0
for i in range (A,B,1):
    I = str(i)
    if int(I[-1]) == int(I[-5]) and int(I[-2]) == int(I[-4]):
        count = count + 1
    else :
        pass

print(count)
Problem p03493 (python)

Fixed submission:
import numpy as np

s1s2s3=int(input())

count1 = 0

num = []

while s1s2s3 != 0:
    num.append(s1s2s3 % 10)
    s1s2s3 //= 10
num.reverse()

for i in range (len(num)):
    if  num[i-1] == 1:
        count1 = count1 + 1
    else:
        pass

print(count1)

Buggy submission (verdict: Runtime Error):
s1,s2,s3 = (int(x) for x in input().split())

count1 = 0
for i in range(1,4,1):
    if s1 == 1:
        count1 = count1 + 1
    else:
        pass
    
print(count1)
Problem p02988 (python)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
cnt = 0

for i in range(1, len(l)-1):
    sub = sorted([l[i-1], l[i], l[i+1]])
    
    if sub[1] == l[i]:
        cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = [*map(int, input().split())]
cnt = 0

for i in range(1, len(l)-1):
    sub = sorted([l[i-1], l[i], l[i+1]])
    
    if sub[1] == l[i]:
        cnt += 1

print(cnt)
Problem p03238 (python)

Fixed submission:
N = int(input())

if N == 1:
    print('Hello World')
else:
    A = int(input())
    B = int(input())
    print(A+B)

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

if N == 1:
    print('Hello World')
else:
    print(A+B)
Problem p03262 (python)

Fixed submission:
def gcd(a, b):
    if b:
        return gcd(b, a%b)
    else:
        return a

#input = __import__('sys').stdin.readline
N, X = map(int, input().split())
l = list(map(int, input().split()))
res = -1

for i in range(N):
    d = abs(l[i] - X)
    
    if res == -1:
        res = d
    else:
        res = gcd(res, d)

print(res)

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    if b:
        return gcd(b, a%b)
    else:
        return a

#input = __import__('sys').stdin.readline
N, X = map(int, input().split())
l = [*map(int, input().split())]
res = -1

for i in range(N):
    d = abs(l[i] - X)
    
    if res == -1:
        res = d
    else:
        res = gcd(res, d)

print(res)

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    if b:
        return gcd(b, a%b)
    else:
        return a

input = __import__('sys').stdin.readline
N, X = map(int, input().split())
l = [*map(int, input().split())]
res = -1

for i in range(N):
    d = abs(l[i] - X)
    
    if res == -1:
        res = d
    else:
        res = gcd(res, d)

print(res)

Buggy submission (verdict: Runtime Error):
from math import gcd

input = __import__('sys').stdin.readline
N, X = map(int, input().split())
l = [*map(int, input().split())]
res = -1

for i in range(N):
    d = abs(l[i] - X)
    
    if res == -1:
        res = d
    else:
        res = gcd(res, d)

print(res)
Problem p03694 (python)

Fixed submission:
input()
l = list(map(int, input().split()))
print(max(l)-min(l))

Buggy submission (verdict: Runtime Error):
input()
l = [*map(int, input().split())]
print(max(l)-min(l))
Problem p03845 (python)

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

for i in range(int(input())):
    P, X = map(int, input().split())
    t = 0
    
    for j in range(N):
        if j+1 == P: t += X
        else: t += T[j]
    
    print(t)

Buggy submission (verdict: Runtime Error):
N = int(input())
T = [*map(int, input().split())]

for i in range(int(input())):
    P, X = map(int, input().split())
    t = 0
    
    for j in range(N):
        if j+1 == P: t += X
        else: t += T[j]
    
    print(t)

Buggy submission (verdict: Runtime Error):
N = int(input())
T = [*map(int, input().split())]

for i in range(int(input())):
    P, X = map(int, input().split())
    t = 0
    
    for j in range(N):
        if j+1 == P: t += X
        else: t += T[j]
    
    print(t)
Problem p02993 (python)

Fixed submission:
try:
    s = input()
    if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
        print('Bad')
    else:
        print('Good')
except EOFError:
    pass

Buggy submission (verdict: Runtime Error):
try:
s = input()
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')
except EOFError:
    pass
Problem p03085 (python)

Fixed submission:
b = input()

if b == "A":
    print("T")
elif b == "T":
    print("A")
elif b == "G":
    print("C")
else:
    print("G")

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

if b == "A":
    print("T")
elif b == "T":
    print("A")
eif b == "G":
    print("C")
else:
    print("G")
Problem p03105 (python)

Fixed submission:
S = input()
S = S.split()
howMuch = int(S[0])
Ihave = int(S[1])
sutis = int(S[2])
 
if (Ihave // howMuch) < sutis:
    print(Ihave // howMuch)
else:
    print(sutis)

Buggy submission (verdict: Runtime Error):
S = input()
S = S.split()
howMuch = S[0]
Ihave = S[1]
sutis = S[2]
 
if (Ihave // howMuch) < sutis:
    print(Ihave // howMuch)
else:
    print(sutis)

Buggy submission (verdict: Runtime Error):
S = input()
S = S.split()
howMuch = S[0]
Ihave = S[1]
sutis = S[2]
 
ans = int(Ihave)/int(howMuch)
ans2 = int(sutis) * int(howMuch)
if ans < sutis:
    print(int(sutis))
else:
    print(int(ans))
Problem p03029 (python)

Fixed submission:
A, P = [int(i) for i in input().split()]
print((A * 3 + P) // 2)

Buggy submission (verdict: Runtime Error):
apple = int(input('りんごの個数') * 3)
piece = int(input('りんごの破片の数'))

apple_pie = (apple + piece) // 2
print(apple_pie)
Problem p02995 (python)

Fixed submission:
import fractions

a, b, c, d = map(int, input().split())
lcm_cd = (c * d) // fractions.gcd(c, d)
total = b - a + 1
d_c = b // c - (a - 1) // c
d_d = b // d - (a - 1) // d
d_cd = b // lcm_cd - (a - 1) // lcm_cd
print(int(total - (d_c + d_d - d_cd)))

Buggy submission (verdict: Runtime Error):
import math

a, b, c, d = map(int, input().split())
lcm_cd = (c * d) // math.gcd(c, d)
total = b - a + 1
d_c = b // c - (a - 1) // c
d_d = b // d - (a - 1) // d
d_cd = b // lcm_cd - (a - 1) // lcm_cd
print(int(total - (d_c + d_d - d_cd)))
Problem p03005 (python)

Fixed submission:
import sys
data = sys.stdin.readlines()
data = data[0].split()
N = int(data[0])
K = int(data[1])
if K == 1:
    print(0)
else:
    print(N-K)

Buggy submission (verdict: Runtime Error):
n = int(input())
cost = 0
points = []
for i in range(n):
    xy = input().split()
    x = int(xy[0])
    y = int(xy[1])
    points.append((x,y))
#points.sort()
while len(points) != 0:
    p = points[-1][0] - points[-2][0]
    q = points[-1][1] - points[-2][1]
    xn = points[-1][0] - p
    yn = points[-1][1] - q
    cost +=1
    points.pop()
    print(p, " ", q)
    while len(points) != 0:
        if points[-1][0] == xn and points[-1][1] == yn:
            xn = points[-1][0] - p
            yn = points[-1][1] - q
            points.pop()
        else:
            break

print(cost)
Problem p02993 (python)

Fixed submission:
S = input()

if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print('Bad')
else:
    print('Good')

Buggy submission (verdict: Runtime Error):
S = input()
A = S.split()

for i in A:
    if A[i] == A[i + 1]:
        print('Bad')
    else:
        print('Good')

Buggy submission (verdict: Runtime Error):
S = str(input())
A = S.split()

for i in A:
    if A[i] == A[i + 1]:
        print('Bad')
    else:
        print('Good')

Buggy submission (verdict: Runtime Error):
S = str(input())
A = S.split()

for i in range(A):
    if A[i]=A[i+1]:
        print('Bad')
    else:
        print('Good')

Buggy submission (verdict: Runtime Error):
S = str(input())
A = S.split()

for i in A:
    if A[i]=A[i+1]:
        print('Bad')
    else:
        print('Good')

Buggy submission (verdict: Runtime Error):
S = input()
A = S.split()

for i in A:
    if A[i]=A[i+1]:
        print('Bad')
    else:
        print('Good')
Problem p03059 (python)

Fixed submission:
a,b,t = (int(i) for i in input().split())
print(t//a*b)

Buggy submission (verdict: Runtime Error):
k = (int(t) + 0.5) // int(a)
i = int(k) * int(b)
print(i)
Problem p03071 (python)

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

if A>B:
    print(A+A-1)
elif A<B:
    print(B+B-1)
else:
    print(A+B)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = map(int, input().split())
hst = 0
cnt = 0
for i in l:
  if hst <= i:
    cnt += 1
    hst = i
print(cnt)

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

if A>B:
    print(A+A-1)
elif A<B:
    print(B+B-1)
else:
    print(A+B)
Problem p03826 (python)

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

Rectangle1 = A*B
Rectangle2 = C*D

if Rectangle1 > Rectangle2:
    print(Rectangle1)
elif Rectangle1 < Rectangle2:
    print(Rectangle2)
else:
    print(Rectangle1)

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

if A*B >= C*D:
  print(A*B)
if C*D>= A*B:
Problem p03853 (python)

Fixed submission:
H, W = map(int, input().split())

for i in range(H):
    c = input()
    print(c + '\n' + c)

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())

for i in range(W):
    c = input()
    print(c + '\n' + c)
Problem p02988 (python)

Fixed submission:
long = int(input())
p = input()
plng = []
pstr = p.split(" ")
n = 0

for i in range(long):
    plng.append(int(pstr[i]))



for i in range(long-2):
    three = [plng[i],plng[i+1],plng[i+2]]
    three.sort()

    if three[1] == plng[i + 1]:
     n = n + 1

print(n)

Buggy submission (verdict: Runtime Error):
long = int(input())
p = input()
plng = []
pstr = p.split(" ")
n = 0

for i in range(long):
    plng.append(int(pstr[i]))


for i in range(long-2):
    three = [plng[i],plng[i+1],plng[i+2]]
    three.sort()

    if three[1] == plng[i + 1]:
     n = n +　1

print(n)

Buggy submission (verdict: Runtime Error):
long = int(input())
p = input()
plng = []
pstr = p.split(" ")
n = 0

for i in range(long):
    plng.append(int(pstr[i]))


for i in range(long-2):
    three = [plng[i],plng[i+1],plng[i+2]]
    three.sort()

    if three[1] == plng[i + 1]:
     n = n +　1

print(n)

Buggy submission (verdict: Runtime Error):
long = int(input())
p = input()
plng = []
pstr = p.split(" ")
n = 0

for i in range(long):
    plng.append(int(pstr[i]))

print(plng)

for i in range(long-2):
    three = [plng[i],plng[i+1],plng[i+2]]
    three.sort()

    if three[1] == plng[i + 1]:
     n = n +　1

print(n)