Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in range(100):
    for j in range(100):
        if 4 * i + 7 * j == n:
            print("Yes")
            exit(0)
print("No")

Fixed submission:
N = int(input())
for i in range(100):
    for j in range(100):
        if 4 * i + 7 * j == N:
            print("Yes")
            exit(0)
print("No")
Buggy python submission (verdict: Runtime Error):
a = int(input())
if a < 1200:
    print("ABC")
elif a < 2800:
    print("ARC")
else a 
    print("AGC")

Fixed submission:
a = int(input())
if a < 1200:
    print("ABC")
elif a < 2800:
    print("ARC")
else:
    print("AGC")

Buggy python submission (verdict: Runtime Error):
a = int(input().split())
if a < 1200:
    print("ABC")
elif a < 2800:
    print("ARC")
else:
    print("AGC")

Fixed submission:
a = int(input())
if a < 1200:
    print("ABC")
elif a < 2800:
    print("ARC")
else:
    print("AGC")

Buggy python submission (verdict: Runtime Error):
a = int, input().split()
if a < 1200:
    print("ABC")
elif a < 2800:
    print("ARC")
else:
    print("AGC")

Fixed submission:
a = int(input())
if a < 1200:
    print("ABC")
elif a < 2800:
    print("ARC")
else:
    print("AGC")
Buggy python submission (verdict: Runtime Error):
S = raw_input()
print(S.count("+") - S.count("-"))

Fixed submission:
S = input()
print(S.count("+") - S.count("-"))
Buggy python submission (verdict: Runtime Error):
S = input()
N = int(input())
if N % sum(S) == 0:
    print("Yes")
else:
    print("No")

Fixed submission:
N = int(input())
S = sum([int(n) for n in str(N)])
if N % S == 0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
S = input()
if S = "abc" or S = "acb" or S = "bac" or S = "bca" or S = "cab" or S = "cba":
    print("Yes")
else:
    print("No")

Fixed submission:
print("Yes" if set(list(input())) == set(["a","b","c"]) else "No")

Buggy python submission (verdict: Runtime Error):
S = list(input())
if S = "abc" or S = "acb" or S = "bac" or S = "bca" or S = "cab" or S = "cba":
    print("Yes")
else:
    print("No")

Fixed submission:
print("Yes" if set(list(input())) == set(["a","b","c"]) else "No")
Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
A = []
for X in input().split():
	x = int(X)
	A.append(x)

for x in range(M):
	max = A.index(max(A))
	A[max] = A[max] / 2

sum = 0
for x in range(len(A)):
	sum += int(A[x])

print(sum)


Fixed submission:
input = input()

if input == "Sunny":
	print("Cloudy")
elif input == "Cloudy":
	print("Rainy")
elif input == "Rainy":
	print("Sunny")
else:
	print("Invalid value")
Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q = (int(x) for x in input().split())

#initialize
score = []
for x in range(N):
	score.append(K)

#point
for x in range(Q):
	A = int(input())
	for y in range(N):
		if y+1 != A:
			score[y] -= 1;

for x in range(N):
	if score[x] > 0:
		print("Yes")
	else:
		print("No")


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

score = [0] * N

for x in range(Q):
	A = int(input())
	score[A-1] += 1;

for x in range(N):
	if score[x] > Q - K:
		print("Yes")
	else:
		print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N,K,Q = (int(x) for x in input().split())

#initialize
score = []
for x in range(N):
	score.append(K)

#point
for x in range(Q):
	A = int(input())
	for y in range(N):
		if y+1 != A:
			score[y] -= 1;

for x in range(N):
	if score[x] > 0:
		print("Yes")
	else:
		print("No")


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

score = [0] * N

for x in range(Q):
	A = int(input())
	score[A-1] += 1;

for x in range(N):
	if score[x] > Q - K:
		print("Yes")
	else:
		print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int, input().split())
A = []
for X in input().split():
	A.append(int(X))

for x in range(M):
	max_num = A.index(max(A))
	A[max_num] = A[max_num] / 2

sum = 0
for x in range(len(A)):
	sum += int(A[x])

print(sum)


Fixed submission:
import heapq

N,M = map(int, input().split())
A = [-int(n) for n in input().split()]

heapq.heapify(A)
for x in range(M):
	heapq.heappush(A, heapq.heappop(A)/2)
A_int = map(int, A)
print(-sum(A_int))

Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
A = []
for X in input().split():
	x = int(X)
	A.append(x)

for x in range(M):
	max = A.index(max(A))
	A[max] = A[max] / 2

sum = 0
for x in range(len(A)):
	sum += int(A[x])

print(sum)


Fixed submission:
import heapq

N,M = map(int, input().split())
A = [-int(n) for n in input().split()]

heapq.heapify(A)
for x in range(M):
	heapq.heappush(A, heapq.heappop(A)/2)
A_int = map(int, A)
print(-sum(A_int))

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int, input().split())
A = []
for X in input().split():
	x = int(X)
	A.append(x)

for x in range(M):
	max = 0
	for y in range(N-1):
		if(A[max] < A[y+1]):
			max = y+1
	A[max] = A[max] / 2

sum = 0
for x in range(len(A)):
	sum += int(A[x])

print(sum)


Fixed submission:
import heapq

N,M = map(int, input().split())
A = [-int(n) for n in input().split()]

heapq.heapify(A)
for x in range(M):
	heapq.heappush(A, heapq.heappop(A)/2)
A_int = map(int, A)
print(-sum(A_int))
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
S = list(input())

p = 0
while K > 0 and p < len(S):
	now = S[p]
	p += 1
	if p >= len(S):
		break
	while now == S[p]:
		p += 1
		if p >= len(S):
			break

	q = p + 1
	if q >= len(S):
		"""
		if S[p] == "R":
			S[p] = "L"
		else:
			S[p] = "R"
		"""
		break
	while S[p] == S[q]:
		q += 1
		if q >= len(S):
			break
	while p < q:
		if S[p] == "R":
			S[p] = "L"
		else:
			S[p] = "R"
		p += 1
		if p >= len(S):
			break
	K -= 1

ret = 0;
print(len(S))
for x in range(len(S)-1):
	print(x)
	if S[x] == S[x + 1]:
		ret += 1
print(ret)


Fixed submission:
N = int(input())
print(N*N*N)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
S = list(input())

p = 0
while K > 0 and p < len(S):
	now = S[p]
	p += 1
	if p >= len(S):
		break
	while now == S[p]:
		p += 1
		if p >= len(S):
			break

	q = p + 1
	if q >= len(S):
		if S[p] == "R":
			S[p] = "L"
		else:
			S[p] = "R"
		break
	while S[p] == S[q]:
		q += 1
		if q >= len(S):
			break
	while p < q:
		if S[p] == "R":
			S[p] = "L"
		else:
			S[p] = "R"
		p += 1
		if p >= len(S):
			break
	K -= 1

ret = 0;
for x in range(len(S)-1):
	if S[x] == S[x + 1]:
		ret += 1
print(ret)


Fixed submission:
N, K = map(int, input().split())
S = list(input())
 
p = 0
while K > 0 and p < len(S):
	now = S[p]
	p += 1
	if p >= len(S):
		break
	while now == S[p]:
		p += 1
		if p >= len(S):
			break
			
	if p >= len(S):
		break
	q = p + 1
	if q >= len(S):
		if S[p] == "R":
			S[p] = "L"
		else:
			S[p] = "R"
		break
	while S[p] == S[q]:
		q += 1
		if q >= len(S):
			break
	while p < q:
		if S[p] == "R":
			S[p] = "L"
		else:
			S[p] = "R"
		p += 1
		if p >= len(S):
			break
	K -= 1
 
ret = 0;
for x in range(len(S)-1):
	if S[x] == S[x + 1]:
		ret += 1
print(ret)
Buggy python submission (verdict: Runtime Error):
n = int(input())
S = {input() for 0 in range(n)}
ans = len(S)
print(ans)


Fixed submission:
n = int(input())
S = {input() for i in range(n)}
ans = len(S)
print(ans)
Buggy python submission (verdict: Runtime Error):
 N,M=map(int, input().split())
print(N*(N-1)//2+M*(M-1)//2)


Fixed submission:
N,M=map(int, input().split())
print(N*(N-1)//2+M*(M-1)//2)
Buggy python submission (verdict: Runtime Error):
A=input()
B=input()
print((6-A-B))

Fixed submission:
A=int(input())
B=int(input())
print((6-A-B))

Buggy python submission (verdict: Runtime Error):
A,B=map(int, input().split())
print(int(6-A-B))

Fixed submission:
A=int(input())
B=int(input())
print((6-A-B))

Buggy python submission (verdict: Runtime Error):
A,B=map(int, input().split())
print(6-A-B)

Fixed submission:
A=int(input())
B=int(input())
print((6-A-B))
Buggy python submission (verdict: Runtime Error):
Cal={'SUN':7 , 'MON':6 , 'TUE':5 , 'WED':4 , 'THU':3 , 'FRI':2 , 'SUT':1}
print(Cal[input()])

Fixed submission:
S = input()
if S=='SUN':
    n=7
elif S=='MON':
    n=6
elif S=='TUE':
    n=5
elif S=='WED':
    n=4
elif S=='THU':
    n=3
elif S=='FRI':
    n=2
else:
    n=1
print(n)
Buggy python submission (verdict: Runtime Error):
a,b = map(int(), input().split())
print(a+b/2)

Fixed submission:
a,b = map(int, input().split())
print(int(a+b/2))
Buggy python submission (verdict: Time Limit Exceeded):
row = int(input())
item_list = [input() for i in range(row)]
result_list = []
for j in item_list:
  if j not in result_list:
    result_list.append(j)

print(len(result_list))


Fixed submission:
row = int(input())
item_list = [input() for i in range(row)]
print(len(set(item_list)))

Buggy python submission (verdict: Time Limit Exceeded):
row = int(input())
item_list = [input() for i in range(row)]
result_list = []
for j in item_list:
  exist_in_item_list = False
  for k in result_list:
    if j == k:
      exist_in_item_list = True
      break
  if not exist_in_item_list:
    result_list.append(j)

print(len(result_list))


Fixed submission:
row = int(input())
item_list = [input() for i in range(row)]
print(len(set(item_list)))

Buggy python submission (verdict: Runtime Error):
row = int(input())
item_list = [input() for i in range(row)]
result_list = []
for j in item_list:
  exist_in_item_list = False
  for k in result_list.len():
    if result_list[k] == item_list[j]:
      exist_in_item_list = True
      break
  if not exist_in_item_list:
    result_list.append(item_list[j])

print(result_list.len())


Fixed submission:
row = int(input())
item_list = [input() for i in range(row)]
print(len(set(item_list)))

Buggy python submission (verdict: Runtime Error):
row = int(input())
item_list = [input() for i in range(row)]
result_list = []
for j in item_list:
  exist_in_item_list = False
  for k in result_list.len():
    if result_list[k] == item_list[j]:
      exist_in_item_list = True
      break
  result_list.append(item_list[j])

print(result_list.len())


Fixed submission:
row = int(input())
item_list = [input() for i in range(row)]
print(len(set(item_list)))
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
takahashi = [a, b] if a>b else [b, a]
aoki = [c, d] if c>d else [d, c]
attackers = [takahashi, aoki]
attacker = 0

while 0 not in takahashi and 0 not in aoki:
  attackers[attacker^1][1] = max(0, attackers[attacker^1][1]-attackers[attacker][0])
  attackers[attacker^1].sort(reverse=True)
  attacker = attacker^1

if 0 in attackers[0]:
  print('No')
else:
  print('Yes')

Fixed submission:
s, w = map(int, input().split())
print('unsafe' if w>=s else 'safe')
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
takahashi = [a, b] if a>b else [b, a]
aoki = [c, d] if c>d else [d, c]
attackers = [takahashi, aoki]
attacker = 0

while 0 not in takahashi and 0 not in aoki:
  attackers[attacker^1][1] = max(0, attackers[attacker^1][1]-attackers[attacker][0])
  attackers[attacker^1].sort(reversed=True)
  attacker = attacker^1

if 0 in attackers[0]:
  print('No')
else:
  print('Yes')

Fixed submission:
a, b, c, d = map(int, input().split())
takahashi = [a, b]
aoki = [c, d]
attackers = [takahashi, aoki]
attacker = 0

while attackers[0][0]!=0 and attackers[1][0]!=0:
  attackers[attacker^1][0] = max(0, attackers[attacker^1][0]-attackers[attacker][1])
  attacker = attacker^1

if attackers[0][0]==0:
  print('No')
else:
  print('Yes')
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = map(int, input().split())
b = a.sorted()
c = list(filter(a[i]!=b[i], range(len(a)))
print('YES' if len(c)==2 else 'NO')

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = sorted(a)
c = list(filter(lambda i: a[i]!=b[i], range(n)))
print('YES' if len(c) in [0,2] else 'NO')
Buggy python submission (verdict: Runtime Error):
from math import gcd
a,b,c,d = map(int, input().split())
c_n = b//c - (a-1)//c
d_n = b//d - (a-1)//d
l = (c*d)//gcd(c,d)
l_n = b//l - (a-1)//l
print(b - a - c_n - d_n + l_n + 1)

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 python submission (verdict: Runtime Error):
from math import gcd
a,b,c,d = map(int, input().split())
c_n = b//c - (a-1)//c
d_n = b//d - (a-1)//d
l = (c*d)//gcd(c,d)
l_n = b//l - (a-1)//l
print(b - a - c_n - d_n + l_n + 1)

Fixed submission:
from fractions import gcd
a,b,c,d = map(int, input().split())
c_n = b//c - (a-1)//c
d_n = b//d - (a-1)//d
l = (c*d)//gcd(c,d)
l_n = b//l - (a-1)//l
print(b - a - c_n - d_n + l_n + 1)

Buggy python submission (verdict: Runtime Error):
from math import gcd
a,b,c,d = map(int, input().split())
c_n = b//c - (a-1)//c
d_n = b//d - (a-1)//d
l = (c*d)//gcd(c,d)
l_n = b//l - (a-1)//l
print(c_n+d_n-l_n)

Fixed submission:
from fractions import gcd
a,b,c,d = map(int, input().split())
c_n = b//c - (a-1)//c
d_n = b//d - (a-1)//d
l = (c*d)//gcd(c,d)
l_n = b//l - (a-1)//l
print(b - a - c_n - d_n + l_n + 1)
Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
a = list()
for _ in range(n):
    a.append(list(map(int, input().split())))
if n in [1,2]:
    print(1)
else:
    a.sort()
    diff = list()
    for i in range(len(a) - 1):
        for j in range(i+1, len(a)):
            x = a[j][0]-a[i][0]
            y = a[j][1]-a[i][1]
            if x<0 and y<0:
                z = (-x,-y)
            elif x<0 and y>0:
                z = (-x,-y)
            else:
                z = (x,y)
            diff.append(z)
    t_diff = Counter(diff).most_common(1)[0][1]
    print(n-t_diff)


Fixed submission:
n , k = map(int, input().split())
if k == 1:
  print(0)
else:
  print(n-k)

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
a = list()
for _ in range(n):
    a.append(list(map(int, input().split())))
if n in [1,2]:
    print(1)
else:
  a.sort()
    diff = list()
    for i in range(len(a) - 1):
        for j in range(i+1, len(a)):
            x = a[j][0]-a[i][0]
            y = a[j][1]-a[i][1]
            if x<0 and y<0:
                z = (-x,-y)
            elif x<0 and y>0:
                z = (-x,-y)
            else:
                z = (x,y)
            diff.append(z)
    t_diff = Counter(diff).most_common(1)[0][1]
    print(n-t_diff)


Fixed submission:
n , k = map(int, input().split())
if k == 1:
  print(0)
else:
  print(n-k)
Buggy python submission (verdict: Runtime Error):
print(sum(map(int, raw_input().split()).sort()[:2]))

Fixed submission:
a,b,c = map(int, raw_input().split())
if a >=b and a>=c:
  print b+c
elif b>=a and b>=c:
  print a+c
else:
  print a+b

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int raw_input().split())
if a >=b and a>=c:
  print b+c
elif b>=a and b>=c:
  print a+c
else:
  print a+b

Fixed submission:
a,b,c = map(int, raw_input().split())
if a >=b and a>=c:
  print b+c
elif b>=a and b>=c:
  print a+c
else:
  print a+b
Buggy python submission (verdict: Runtime Error):
n, m = tuple(map(int, raw_input().split()))
x = sorted(list(map(int, raw_input().split())))
y = [tuple(map(int, raw_input().split())) for i in range(m)]
y = sorted(key = lambda x: x[1], reverse=True)
for b,c in y:
  while x[b-1] > c and b > 0:
    b -= 1
  x[0:b] = [c]*b
  x.sort()
print(sum(x))


Fixed submission:
n, m = tuple(map(int, raw_input().split()))
x = sorted(list(map(int, raw_input().split())))
y = [list(map(int, raw_input().split())) for i in range(m)]
y.sort(key = lambda x: x[1], reverse=True)
y_pos = 0
for index, value in enumerate(x):
  b = y[y_pos][0]
  c = y[y_pos][1]
  if value < c:
	  x[index] = c
	  y[y_pos][0] = b-1
	  if b == 1:
		  y_pos += 1
		  if y_pos == len(y):
			  break
  else:
	  break

print(sum(x))

Buggy python submission (verdict: Time Limit Exceeded):
n, m = tuple(map(int, raw_input().split()))
x = sorted(list(map(int, raw_input().split())))
y = [tuple(map(int, raw_input().split())) for i in range(m)]
for b,c in y:
  while x[b-1] > c and b > 0:
    b -= 1
  x[0:b] = [c]*b
  x.sort()
print(sum(x))

Fixed submission:
n, m = tuple(map(int, raw_input().split()))
x = sorted(list(map(int, raw_input().split())))
y = [list(map(int, raw_input().split())) for i in range(m)]
y.sort(key = lambda x: x[1], reverse=True)
y_pos = 0
for index, value in enumerate(x):
  b = y[y_pos][0]
  c = y[y_pos][1]
  if value < c:
	  x[index] = c
	  y[y_pos][0] = b-1
	  if b == 1:
		  y_pos += 1
		  if y_pos == len(y):
			  break
  else:
	  break

print(sum(x))

Buggy python submission (verdict: Runtime Error):
n, m = tuple(map(int, raw_input().split()))
x = sorted(list(map(int, raw_input().split())))
y = [tuple(map(int, raw_input().split())) for i in range(m)]
for b,c in y:
  while x[b-1] > c:
    b -= 1
  x[0:b] = [c]*b
  x.sort()
print(sum(x))


Fixed submission:
n, m = tuple(map(int, raw_input().split()))
x = sorted(list(map(int, raw_input().split())))
y = [list(map(int, raw_input().split())) for i in range(m)]
y.sort(key = lambda x: x[1], reverse=True)
y_pos = 0
for index, value in enumerate(x):
  b = y[y_pos][0]
  c = y[y_pos][1]
  if value < c:
	  x[index] = c
	  y[y_pos][0] = b-1
	  if b == 1:
		  y_pos += 1
		  if y_pos == len(y):
			  break
  else:
	  break

print(sum(x))

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
x = list(map(int, input().split())).sort()
y = [tuple(map(int, input().split())) for i in range(m)]
for b,c in y:
  while x[b-1] > c:
    b -= 1
  x[0:b] = [c]*b
  x.sort(()

Fixed submission:
n, m = tuple(map(int, raw_input().split()))
x = sorted(list(map(int, raw_input().split())))
y = [list(map(int, raw_input().split())) for i in range(m)]
y.sort(key = lambda x: x[1], reverse=True)
y_pos = 0
for index, value in enumerate(x):
  b = y[y_pos][0]
  c = y[y_pos][1]
  if value < c:
	  x[index] = c
	  y[y_pos][0] = b-1
	  if b == 1:
		  y_pos += 1
		  if y_pos == len(y):
			  break
  else:
	  break

print(sum(x))
Buggy python submission (verdict: Runtime Error):
# 時間かかりすぎ
s = list(input())
k = int(input())
t = s * k

count = 0
for i in range(1, len(t)):
    if t[i-1] == t[i]:
        count += 1
        t[i] = '-'
print(count)


Fixed submission:
s = list(input())
s2 = s[:]
k = int(input())

s1_count = 0
for i in range(1, len(s)):
    if s[i-1] == s[i]:
        s1_count += 1
        s[i] = '-'

if k == 1:
    print(s1_count)
elif s[0] != s[-1]:
    print(s1_count * k)
elif len(list(set(s2))) == 1:
    if len(s) % 2 == 0:
        print(s1_count * k)
    else:
        s2_count = s1_count + 1
        if k % 2 == 0:
            print(int((s1_count + s2_count) * (k // 2)))
        else:
            print(int((s1_count + s2_count) * (k // 2) + s1_count))
else:
    s2_count = 0
    if s[-1] == '-':
        print(s1_count * k)
    else:
        s2[0] = '-'
        s2_count += 1
        for i in range(1, len(s2)):
            if s2[i-1] == s2[i]:
                s2_count += 1
                s2[i] = '-'
        print(s1_count + s2_count * (k-1))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
height = list(map(int, input().split()))
max_count = 0
for i in range(n):
    count = 0
    for j in range(i, n):
        if j == n - 1 or height[j] < height[j + 1]:
            break
        count += 1
    max_count = max(max_count, count)
print(max_count)


Fixed submission:
n = int(input())
height = list(map(int, input().split()))
max_count = 0
count = 0
for i in range(n - 1):
    if height[i] < height[i + 1]:
        max_count = max(count, max_count)
        count = 0
        continue
    count += 1
max_count = max(count, max_count)
print(max_count)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

sum = 0
for i in range(n):
    sum += i

print(sum)


Fixed submission:
n = int(input())

print((n * (n - 1)) // 2)

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

def kaidan(n):
    if n <= 1:
        return 0
    else:
        return n - 1 + kaidan(n - 1)

print(kaidan(n))

Fixed submission:
n = int(input())

print((n * (n - 1)) // 2)
Buggy python submission (verdict: Runtime Error):
import tensorflow
S, W = map(int, input().split())
def f():
  if W >= S:
    return "unsafe"
  else:
    return "safe"
print(f())


Fixed submission:
S, W = map(int, input().split())
def f():
  if W >= S:
    return "unsafe"
  else:
    return "safe"
print(f())
Buggy python submission (verdict: Time Limit Exceeded):
import math

K = int(input())

sum = 0

for a in range(K):
    for b in range(K):
        for c in range(K):
            sum += math.gcd(math.gcd(a + 1, b + 1), c + 1)

print(sum)


Fixed submission:
import math

K = int(input())

sum = 0

for a in range(K):
    sum += a + 1
    #print(a + 1, a + 1)
    for b in range(K):
        if a < b:
            gcd2_sum = math.gcd(a + 1, b + 1) * 3 * 2
            sum += gcd2_sum
            #print(a + 1, b + 1, gcd2_sum)
            for c in range(K):
                if b < c:
                    gcd3_sum = math.gcd(math.gcd(a + 1, b + 1), c + 1) *  6
                    sum += gcd3_sum
                    #print(a + 1, b + 1, c + 1, gcd3_sum)
print(sum)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(a,b,c)
print(a,b,-a-b+3*c)
print(-2*a-b+4*c,c,2*a+b-2*c)
print(a+b-c,-b+2*c,-a+2*c)

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
print(a,b,-a-b+3*c)
print(-2*a-b+4*c,c,2*a+b-2*c)
print(a+b-c,-b+2*c,-a+2*c)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))

x = [0]*n
j = 0
for i in range(n):
    k = 1
    while j < n-1:
        if i+1 == a[j]:
            j+=1
            k+=1
        else:
            break
    x[i] = k

ans = [print(_) for _ in x]

Fixed submission:
import math
r = int(input())
print(r*2*math.pi)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))

x = [0]*n
j = 0
for i in range(n):
    k = 0
    while j < n-1:
        if i+1 == a[j]:
            j=j+1
            k=k+1
        else:
            break
    x[i] = k

ans = [print(_) for _ in x]

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = [0] * n
for i in range(len(a)):
    ans[a[i]-1] += 1
for i in range(n):
    print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(input())
x = [print(a.count(str(i+1))) for i in range(n)]

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = [0] * n
for i in range(len(a)):
    ans[a[i]-1] += 1
for i in range(n):
    print(ans[i])
Buggy python submission (verdict: Runtime Error):
S = input()

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

print(7 - dict[S])

Fixed submission:
S = input()
 
dict = {
  'SUN': 0,
  'MON': 1,
  'TUE': 2,
  'WED': 3,
  'THU': 4,
  'FRI': 5,
  'SAT': 6
}
 
print(7 - dict[S])
Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
dp=[0]*(n+1)
dp[0]=1
for i in range(1,n+1):
    dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)
    if i in a:
        dp[i]=0
print(dp[n])

Fixed submission:
n,m=map(int,input().split())
a=set([int(input()) for i in range(m)])
dp=[0]*(n+1)
dp[0]=1
for i in range(1,n+1):
    dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)
    if i in a:
        dp[i]=0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
dp=[0]*(n+1)
dp[0]=1
for i in range(1,n+1):
    dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)
    if i in a:
        dp[i]=0
print(dp[n])

Fixed submission:
n,m=map(int,input().split())
a=set([int(input()) for i in range(m)])
dp=[0]*(n+1)
dp[0]=1
for i in range(1,n+1):
    dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)
    if i in a:
        dp[i]=0
print(dp[n])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

L = []
for a in A:
    L.append(a)
    L.reverse() 
print(*L)

Fixed submission:
from collections import deque
N = int(input())
A = list(map(int, input().split()))

B = deque()

if N % 2 == 0:
    for i in range(N):
        if i % 2 == 0:
            B.append(A[i])
        else:
            B.appendleft(A[i])
else:
    for i in range(N):
        if i % 2 == 0:
            B.appendleft(A[i])
        else:
            B.append(A[i])

print(*B)