Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N=input()
A=input()
B=input()
if N==1:
    print "Hello World"
elif N==2:
    print A+B
    

Fixed submission:
N=input()
if N==1:
    print "Hello World"
elif N==2:
    A = input()
    B = input()
    print A+B

Buggy python submission (verdict: Runtime Error):
N,A,B=input()
if N==1:
    print "Hello World"
elif N==2:
    print A+B

Fixed submission:
N=input()
if N==1:
    print "Hello World"
elif N==2:
    A = input()
    B = input()
    print A+B
Buggy python submission (verdict: Runtime Error):
x=raw_input()
print 1110-x

Fixed submission:
x=input()
print 1110-x
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,raw_input().split())
max_num=a
if max_num < b
    max_num=b
if max_num < c
    max_num=c
print max_num*9+(a+b+c)

Fixed submission:
A,B,C = map(int,raw_input().split())
max_num=A
if max_num < B:
    max_num = B
if max_num < C:
    max_num= C
print max_num*9+(A+B+C)
Buggy python submission (verdict: Runtime Error):
N=input()
j=input()
print N-j+1 

Fixed submission:
N,j= map(int,raw_input().split())
print N-j+1
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,raw_input().split())
if c-a < d or a-c<d:
  print "Yes"
elif b-c <d or c-b<d:
  print "Yes":
elif a-b <d or b-a<d:
  print "Yes"
else:
  print "No"


Fixed submission:
a,b,c,d=map(int,raw_input().split())
if abs(c-a) <=d or abs(a-b) <=d and abs(b-c) <=d:
  print "Yes"
else:
  print "No"
Buggy python submission (verdict: Runtime Error):
s=input()
if a in s and b in s and c in s:
  print "Yes"
else:
  print "No"

Fixed submission:
s=raw_input()
sa=0
sb=0
sc=0
for i in range(len(s)):
  if s[i]=="a":
    sa+=1
  if s[i]=="b":
    sb+=1
  if s[i]=="c":
    sc+=1
if sa==1 and sb==1 and sc==1:
    print "Yes"
else: 
    print "No"

Buggy python submission (verdict: Runtime Error):
s=map(int,raw_input().split())
sa=0
sb=0
sc=0
for i in range(len(s)):
  if s[i]=="a":
    sa+=1
  if s[i]=="b":
    sb+=1
  if s[i]=="c":
    sc+=1
if sa==1 and sb==1 and sc==1:
    print "Yes"
else: 
    print "No"

Fixed submission:
s=raw_input()
sa=0
sb=0
sc=0
for i in range(len(s)):
  if s[i]=="a":
    sa+=1
  if s[i]=="b":
    sb+=1
  if s[i]=="c":
    sc+=1
if sa==1 and sb==1 and sc==1:
    print "Yes"
else: 
    print "No"

Buggy python submission (verdict: Runtime Error):
s=map(int,raw_input().split())
sa=0
sb=0
sc=0
for i in range(len(s)):
  if s[i]=="a":
    sa+=1
  if s[i]=="b":
    sb+=1
  if s[i]=="c":
    sc+=1
if sa==1 and sb==1 and sc==1:
    print "Yes"
else: 
  print "No"

Fixed submission:
s=raw_input()
sa=0
sb=0
sc=0
for i in range(len(s)):
  if s[i]=="a":
    sa+=1
  if s[i]=="b":
    sb+=1
  if s[i]=="c":
    sc+=1
if sa==1 and sb==1 and sc==1:
    print "Yes"
else: 
    print "No"

Buggy python submission (verdict: Runtime Error):
s=map(int,raw_input().split())
sa=0
sb=0
sc=0
for i in range(len(s)):
  if s[i]=="a":
    sa+=1
  if s[i]=="b":
    sb+=1
  if s[i]=="c":
    sc+=1
if sa=1 and sb=1 and sc=1:
    print "Yes"
else: 
  print "No"

Fixed submission:
s=raw_input()
sa=0
sb=0
sc=0
for i in range(len(s)):
  if s[i]=="a":
    sa+=1
  if s[i]=="b":
    sb+=1
  if s[i]=="c":
    sc+=1
if sa==1 and sb==1 and sc==1:
    print "Yes"
else: 
    print "No"

Buggy python submission (verdict: Runtime Error):
s=raw_input()
sa=0
sb=0
sc=0
for i in range(len(s)):
  if s[i]=="a":
    sa+=1
  if s[i]=="b":
    sb+=1
  if s[i]=="c":
    sc+=1
if sa=1 and sb=1 and sc=1:
    print "Yes"
else: 
  print "No"
  
    
  

Fixed submission:
s=raw_input()
sa=0
sb=0
sc=0
for i in range(len(s)):
  if s[i]=="a":
    sa+=1
  if s[i]=="b":
    sb+=1
  if s[i]=="c":
    sc+=1
if sa==1 and sb==1 and sc==1:
    print "Yes"
else: 
    print "No"
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,raw_input().split())
leastnum=0
if a>b and c>d:
  leastnum=b+d
elif a>b and d>c:
  leastnum=b+c
elif b>a and c>d:
  leastnum=a+d
elif b>a and d>c:
  leastnum=a+c
print leastnum

Fixed submission:
a=input()
b=input()
c=input()
d=input()
leastnum=0
if a>=b and c>=d:
  leastnum=b+d
elif a>=b and d>=c:
  leastnum=b+c
elif b>=a and c>=d:
  leastnum=a+d
elif b>=a and d>=c:
  leastnum=a+c
print leastnum
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,raw_input().split())
if a+b=>c:
  print "Yes"
else:
  print "No"

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

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

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

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

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

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
if a+b>c:
  print "yes"
else:
  print "no"

Fixed submission:
a,b,c=map(int,raw_input().split())
if a+b>=c:
  print "Yes"
else:
  print "No"
Buggy python submission (verdict: Runtime Error):
x,a,b=map(int,raw_input().split())
print (x-a)%b

Fixed submission:
x=input()
a=input()
b=input()
print (x-a)%b
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,raw_input().split())
if a+b<c+d:
  print "Right"
elif a+b>c+d:
  print "Left"
elif a+b=c+d:
  print "Balanced"

Fixed submission:
a,b,c,d=map(int,raw_input().split())
if a+b<c+d:
  print "Right"
elif a+b>c+d:
  print "Left"
else:
  print "Balanced"
Buggy python submission (verdict: Runtime Error):
n=raw_input()
if n[0]=n[1]=n[2]=n[3] or n[0]=n[1]=n[2]!=n[3] or n[1]=n[2]=n[3]!=n[0]:
  print "Yes"
else:
  print "No"

Fixed submission:
n=raw_input()
if n[0]==n[1]==n[2]==n[3] or n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
  print "Yes"
else:
  print "No"

Buggy python submission (verdict: Runtime Error):
n=raw_input()
if n[1]=n[2]=n[3]=n[4] or n[1]=n[2]=n[3]!=n[4] or n[2]=n[3]=n[4]!=n[1]:
  print "Yes"
else:
  print "No"

Fixed submission:
n=raw_input()
if n[0]==n[1]==n[2]==n[3] or n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
  print "Yes"
else:
  print "No"

Buggy python submission (verdict: Runtime Error):
n=input()
if n[1]=n[2]=n[3]=n[4] or n[1]=n[2]=n[3]!=n[4] or n[2]=n[3]=n[4]!=n[1]:
  print "Yes"
else:
  print "No"

Fixed submission:
n=raw_input()
if n[0]==n[1]==n[2]==n[3] or n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
  print "Yes"
else:
  print "No"
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,raw_input().split())
if a ==b and a!=c:
  print c
elif b == c and b != a:
  print a 
elif: a==c and a !=b:
  print b

Fixed submission:
a,b,c=map(int,raw_input().split())
if a ==b and a!=c:
  print c
elif b == c and b != a:
  print a 
else:
  print b
Buggy python submission (verdict: Runtime Error):
x,t=map(int,raw_input().split())
if t>X:
  print 0 
else:
  print X-t

Fixed submission:
X,t=map(int,raw_input().split())
if t>=X:
  print "0" 
else:
  print X-t

Buggy python submission (verdict: Runtime Error):
X=input()
t=input()
if t>X:
  print 0 
else:
  print X-t

Fixed submission:
X,t=map(int,raw_input().split())
if t>=X:
  print "0" 
else:
  print X-t

Buggy python submission (verdict: Runtime Error):
X=input()
t=input()
if t>X:
  print "0" 
else:
  print X-t

Fixed submission:
X,t=map(int,raw_input().split())
if t>=X:
  print "0" 
else:
  print X-t
Buggy python submission (verdict: Runtime Error):
n=input()
m=input()
print (n*m)/2

Fixed submission:
n,m=map(int,raw_input().split())
print (n-1)*(m-1)
Buggy python submission (verdict: Runtime Error):
n=raw_input()
print [ABC+n]

Fixed submission:
n=raw_input()
print "ABC"+n
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
if (a+b)%3==0:
  print "Possible"
else:
  print "Impossible"

Fixed submission:
a,b=map(int,raw_input().split())
if (a+b)%3==0 or a%3==0 or b%3==0:
  print "Possible"
else:
  print "Impossible"
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
if a+b < 10:
  print a+b
else:
  print "error"

Fixed submission:
a,b=map(int,raw_input().split())
if a+b < 10:
  print a+b
else:
  print "error"
Buggy python submission (verdict: Runtime Error):
x,y=map(int,raw_input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
for i in range(1000):
  if a[i]==x and a[i]==y:
    print "Yes"
  elif b[i]==x and b[i]==y:
    print "Yes"
  else:
    print "No"

Fixed submission:
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
x,y=map(int,raw_input().split())
ans= "No"
if x in a and y in a:
  ans= "Yes"
elif x in b and y in b:
  ans = "Yes"
print ans

Buggy python submission (verdict: Runtime Error):
x=input()
y=input()
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
for i in range(1000):
  if a[i]==x and a[i]==y:
    print "Yes"
  elif b[i]==x and b[i]==y:
    print "Yes"
  else:
    print "No"
  

Fixed submission:
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
x,y=map(int,raw_input().split())
ans= "No"
if x in a and y in a:
  ans= "Yes"
elif x in b and y in b:
  ans = "Yes"
print ans
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,raw_input().split())
if a[len(a)-1]== b[0] and b[len(b)-1]==c[0]:
  print "YES"
else:
  print "NO"

Fixed submission:
a,b,c=raw_input().split()
if a[len(a)-1]== b[0] and b[len(b)-1]==c[0]:
  print "YES"
else:
  print "NO"

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,raw_input(),split())
if a[len(a)-1]== b[0] and b[len(b)-1]==c[0]:
  print "YES"
else:
  print "NO"

Fixed submission:
a,b,c=raw_input().split()
if a[len(a)-1]== b[0] and b[len(b)-1]==c[0]:
  print "YES"
else:
  print "NO"
Buggy python submission (verdict: Runtime Error):
a,b,c=raw_input
ans= a[0]+b[0]+c[0]
print ans.upper()

Fixed submission:
a,b,c=raw_input().split()
ans= a[0]+b[0]+c[0]
print ans.upper()

Buggy python submission (verdict: Runtime Error):
a,b,c=raw_input.split()
ans= a[0]+b[0]+c[0]
print ans.upper()

Fixed submission:
a,b,c=raw_input().split()
ans= a[0]+b[0]+c[0]
print ans.upper()

Buggy python submission (verdict: Runtime Error):
a,b,c=raw_input
A=a[0]
B=b[0]
C=c[0]
print A.upper()+B.upper()+C.upper()

Fixed submission:
a,b,c=raw_input().split()
ans= a[0]+b[0]+c[0]
print ans.upper()

Buggy python submission (verdict: Runtime Error):
a,b,c=raw_input.split()
A=a[0]
B=b[0]
C=c[0]
print A.upper()+B.upper()+C.upper()

Fixed submission:
a,b,c=raw_input().split()
ans= a[0]+b[0]+c[0]
print ans.upper()

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,raw_input().split())
A=a[0]
B=b[0]
C=c[0]
print A.upper()+B.upper()+C.upper()

Fixed submission:
a,b,c=raw_input().split()
ans= a[0]+b[0]+c[0]
print ans.upper()
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
if b-a==c-b:
  print "YES"
else:
  print"NO"

Fixed submission:
a,b,c=map(int,raw_input().split())
if b-a==c-b:
  print "YES"
else:
  print"NO"

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,raw_input().split())
if b-a==c-b:
  print "YES"
else:
  ptint"NO"

Fixed submission:
a,b,c=map(int,raw_input().split())
if b-a==c-b:
  print "YES"
else:
  print"NO"

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
if b-a==c-b:
  print "YES"
else:
  ptint"NO"

Fixed submission:
a,b,c=map(int,raw_input().split())
if b-a==c-b:
  print "YES"
else:
  print"NO"

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,raw_input().split())
if b-a==c-b:
  print "YES"
else:
  ptint"NO"

Fixed submission:
a,b,c=map(int,raw_input().split())
if b-a==c-b:
  print "YES"
else:
  print"NO"
Buggy python submission (verdict: Runtime Error):
n=map(int,raw_input().split())
x=800*n
y=200(n/15)
print x-y

Fixed submission:
n=input()
x=800*n
y=200*(n/15)
print x-y

Buggy python submission (verdict: Runtime Error):
n=input()
x=800*n
y=200(n/15)
print x-y

Fixed submission:
n=input()
x=800*n
y=200*(n/15)
print x-y

Buggy python submission (verdict: Runtime Error):
N=input()
print (800*N) - 200(N/15)

Fixed submission:
n=input()
x=800*n
y=200*(n/15)
print x-y

Buggy python submission (verdict: Runtime Error):
n=raw_input().split()
print 800*n -200(n/15)

Fixed submission:
n=input()
x=800*n
y=200*(n/15)
print x-y

Buggy python submission (verdict: Runtime Error):
n=input()
print 800*n -200(n/15)
  

Fixed submission:
n=input()
x=800*n
y=200*(n/15)
print x-y
Buggy python submission (verdict: Runtime Error):
A op B=map(int,raw_input.split())
print A op B 

Fixed submission:
a,op,b=raw_input().split()
if op=="+":
  print int(a)+int(b)
else:
  print int(a)-int(b)
Buggy python submission (verdict: Runtime Error):
c=raw_input().split 
if c in [a,e,i,o,u]:
  print "vowel"
else:
  print "consonant"

Fixed submission:
c=raw_input()
if c in "a,e,i,o,u":
  print "vowel"
else:
  print "consonant"

Buggy python submission (verdict: Runtime Error):
c=raw_input()
if c in [a,e,i,o,u]:
  print "vowel"
else:
  print "consonant"

Fixed submission:
c=raw_input()
if c in "a,e,i,o,u":
  print "vowel"
else:
  print "consonant"

Buggy python submission (verdict: Runtime Error):
c=raw_input()
if c==a or c==e or c==i or c==o or c==u:
  print "vowel"
else:
  print "consonant"

Fixed submission:
c=raw_input()
if c in "a,e,i,o,u":
  print "vowel"
else:
  print "consonant"

Buggy python submission (verdict: Runtime Error):
c=raw_input()
if c==a or a==e or a==i or a==o or a==u:
  print "vowel"
else:
  print "consonant"

Fixed submission:
c=raw_input()
if c in "a,e,i,o,u":
  print "vowel"
else:
  print "consonant"
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
if a+b+c==17:
  print "YES"
else:
  print "NO"

Fixed submission:
a,b,c=map(int,raw_input().split())
if a+b+c==17:
  print "YES"
else:
  print "NO"

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,raw_input.split())
if a+b+c==17:
  print "YES"
else:
  print "NO"

Fixed submission:
a,b,c=map(int,raw_input().split())
if a+b+c==17:
  print "YES"
else:
  print "NO"
Buggy python submission (verdict: Time Limit Exceeded):
import math

num = int(input())

sum_gcd = 0

for i in range(1, num + 1):
  for j in range(1, num + 1):
    for k in range(1, num + 1):
      sum_gcd += math.gcd(math.gcd(i, j), k)

print(sum_gcd)

Fixed submission:
import math

K = int(input())
print(sum([math.gcd(math.gcd(i, j), k) for i in range(1, K+1) for j in range(1, K+1) for k in range(1, K+1)]))

Buggy python submission (verdict: Time Limit Exceeded):
num = int(input())

def divisor(num):
  divisor_set = {1, num}
  for i in range(2, num):
    if num % i == 0:
      divisor_set.add(i)
  return divisor_set

def gcd(a, b, c):
  a_div = divisor(a)
  b_div = divisor(b)
  c_div = divisor(c)
  common_div = a_div.intersection(b_div).intersection(c_div)
  gcd = max(common_div)
  return gcd

sum_gcd = 0

for i in range(1, num + 1):
  for j in range(1, num + 1):
    for k in range(1, num + 1):
      sum_gcd += gcd(i, j, k)
      
print(sum_gcd)

Fixed submission:
import math

K = int(input())
print(sum([math.gcd(math.gcd(i, j), k) for i in range(1, K+1) for j in range(1, K+1) for k in range(1, K+1)]))
Buggy python submission (verdict: Runtime Error):
num_list = input()

temp = num_list[1] # temporarily save B
num_list[1] = num_list[0] # put A in B
num_list[0] = temp # put B in A

temp = num_list[0] # temporarily save A
num_list[0] = num_list[2] # put C in A
num_list[2] = temp # put A in C

print(num_list)

Fixed submission:
num_list = input()
num_list = num_list.split(' ')

temp = num_list[1] # temporarily save B
num_list[1] = num_list[0] # put A in B
num_list[0] = temp # put B in A
 
temp = num_list[0] # temporarily save A
num_list[0] = num_list[2] # put C in A
num_list[2] = temp # put A in C
 
print(' '.join(num_list))
Buggy python submission (verdict: Runtime Error):
n, k = [int(x) for x in input().split(' ')]

def abs_diff(n, k):
  first_time = abs(n - k)
  second_time = abs(first_time - k)
  if second_time <= first_time:
    abs_diff(first_time, k)
  elif first_time <= n:
    print(first_time)
  else:
    print(n)

abs_diff(n, k)

Fixed submission:
n, k = list(map(int, input().split()))
 
print(min(n % k, abs(k - n % k)))

Buggy python submission (verdict: Runtime Error):
nk = [int(x) for x in input().split(' ')]

def abs_diff(n, k):
  first_time = abs(n - k)
  second_time = abs(first_time - k)
  if second_time < first_time:
    abs_diff(first_time, k)
  elif first_time < n:
    print(first_time)
  else:
    print(n)

abs_diff(nk[0], nk[1])

Fixed submission:
n, k = list(map(int, input().split()))
 
print(min(n % k, abs(k - n % k)))

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

def abs_diff(n, k):
  first_time = abs(n - k)
  second_time = abs(first_time - k)
  if second_time < first_time:
    abs_diff(first_time, k)
  elif first_time < n:
    print(first_time)
  else:
    print(n)

abs_diff(n, k)

Fixed submission:
n, k = list(map(int, input().split()))
 
print(min(n % k, abs(k - n % k)))
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)


k = int(input())
s = 0
for a in range(1,k+1):
    for b in range(1, k + 1):
        for c in range(1,k+1):
            s += gcd(a, b, c)

print(s)

Fixed submission:
import math
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)


k = int(input())
s = 0

# a = b = c -> gcd(a,a,a) -> a
for a in range(1, k+1):
    s += a

# a = b, a < c -> gcd(a, c)と同じ -> gcd(c, a)も同じ 6倍
for a in range(1, k+1):
    for b in range(a+1, k+1):
        s += gcd(a, a, b) * 6

# a < b < c -> gcd(a, b, c)と同じ -> 6通り

for a in range(1, k+1):
    for b in range(a+1, k+1):
        for c in range(b+1, k+1):
            s += gcd(a, b, c) * 6

print(s)

Buggy python submission (verdict: Time Limit Exceeded):
def gcd(x, y, z):
  while y:
    x, y = y, x % y
  while z:
    x, z = z, x % z
  return x

N = int(input())
wa = 0
for i in range (1,N+1):
  for j in range (1,N+1):
    for h in range (1,N+1):
      wa += gcd(i,j,h) 
print(wa)
  
  

Fixed submission:
from math import gcd

"""
def gcd(x, y, z):
  while y:
    x, y = y, x % y
  while z:
    x, z = z, x % z
  return x
"""

N = int(input())
wa = 0
for i in range (1,N+1):
  for j in range (1,N+1):
    for h in range (1,N+1):
      wa += gcd(gcd(i,j),h) 
print(wa)

Buggy python submission (verdict: Time Limit Exceeded):
def gcd(a, b):
    if a % b == 0:
        return b
    return gcd(b, a % b)

k = int(input())
sum_c = 0

for a in range(1, k + 1):
    for b in range(1, k + 1):
        for c in range(1, k + 1):
            p = gcd(a, b)
            sum_c += gcd(c, p)

print(sum_c)

Fixed submission:
from  math import gcd

 
k = int(input())
sum_c = 0
 
for a in range(1, k + 1):
    for b in range(1, k + 1):
        for c in range(1, k + 1):
            sum_c += gcd(gcd(a, b), c)
            
print(sum_c)

Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

k = int(input())
sum_c = 0

for a in range(1, k + 1):
    for b in range(1, k + 1):
        for c in range(1, k + 1):
            sum_c += gcd(a, b, c)
            
            
print(sum_c)



Fixed submission:
from  math import gcd

 
k = int(input())
sum_c = 0
 
for a in range(1, k + 1):
    for b in range(1, k + 1):
        for c in range(1, k + 1):
            sum_c += gcd(gcd(a, b), c)
            
print(sum_c)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

count = 0

for i in range(len(s)):
    for j in range(i + 1, len(s)):
        if s[i] != s[j]:
            for k in range(j + 1, len(s)):
                if ((k - j) != (j - i)) and (s[i] != s[k]) and (s[j] != s[k]):
                    count += 1

print(count)



Fixed submission:
import math

k = int(input())
n = input()

r = n.count("R")
g = n.count("G")
b = n.count("B")

ans = r*g*b

for i in range(k):
    
    for j in range(i + 1, math.ceil((k + i)/2)):
        
        if (n[i] != n[j]) and (n[2*j - i] != n[i]) and (n[j] != n[2*j - i]):
            ans -= 1

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

mo = n%k

mok = abs(mo - k)

if mo <= mok:
    print(mo)
else:
    print(mok)

Fixed submission:
x, y, z = map(int, input().split())

print(z, x, y)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())

mo = n%k

mok = abs(mo - k)

if mo = mok:
    print(mo)
else:
    print(mok)

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

mo = n%k

mok = abs(mo - k)

if mo <= mok:
    print(mo)
else:
    print(mok)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())

min_n = n
n = abs(n - k)
#print(n, k)
if n >= min_n:
    print(min_n)

else:
    cou = 0
    while(min_n >= n):

        cou += 1
        min_n = n
        n = abs(n - k)
        #print(n)
        

    print(min_n)


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

mo = n%k

mok = abs(mo - k)

if mo <= mok:
    print(mo)
else:
    print(mok)
Buggy python submission (verdict: Runtime Error):
#atcoder beginner contest 141

weather = input("")

if weather == "Sunny":
    print("Cloudy")
elif weather == "Cloudy":
    prinnt("Rainy")
elif weather == "Rainy":
    print("Sunny")




Fixed submission:
#atcoder beginner contest 141

weather = input("")

if weather == "Sunny":
    print("Cloudy")
elif weather == "Cloudy":
    print("Rainy")
elif weather == "Rainy":
    print("Sunny")
Buggy python submission (verdict: Time Limit Exceeded):
#atcorder beginner contest 141
#D powerful discount tickets
import math

goods, tickets = input().split()
goods = int(goods)
tickets = int(tickets)

price = []
total = 0

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

for i in range(tickets):
    max_index = price.index(max(price))
    max_price = math.floor(max(price) / 2)
    price[max_index] = max_price


for i in range(goods):
    total += price[i]

print(total)

Fixed submission:
#atcorder beginner contest 141
#D powerful discount tickets
import math
import heapq

goods, tickets = map(int, input().split())

price = []
price = list(map(lambda x: int(x)*(-1), input().split()))
heapq.heapify(price)


for i in range(tickets):
    max = heapq.heappop(price) * (-1)
    heapq.heappush(price, math.ceil(-max/2))
   

total = 0
for i in range(goods):
    total += price[i]

print(total * (-1))
Buggy python submission (verdict: Runtime Error):
from Math import gcd

K = int(input())

result = 0
for a in range(1, K + 1):
  for b in range(1, K + 1):
    for c in range(1, K + 1):
      result += gcd(c, gcd(a, b))
      
print(result)

Fixed submission:
from math import gcd
 
K = int(input())
 
result = 0
for a in range(1, K + 1):
  for b in range(1, K + 1):
    for c in range(1, K + 1):
      result += gcd(c, gcd(a, b))
      
print(result)
Buggy python submission (verdict: Runtime Error):
##C problem
N = int(input())
v = list(map(float, input().split()))
##初期処理
a=min(v)
##最初に出てくる指定した要素を削除
#v.remove(a)
#v.remove(b)
#v.append( (a+b)/2 )

for i in range(N-1):
        a=v[-1]
        remove(a)
        b=min(v)
        v.remove(b)
        v.append((a+b)/2)

Fixed submission:
##C problem
N = int(input())
v = list(map(float, input().split()))

vs = sorted(v)

for i in range(N-1):

    a=vs[0]

    b=vs[1]
    c=(a+b)/2
    vs.remove(b)
    vs.insert(0,c)
    vs.remove(a)
    #print(i)
    #print(vs)

print(vs[0])

Buggy python submission (verdict: Runtime Error):
##C problem
N = int(input())
v = list(map(float, input().split()))
##初期処理
a=min(v)
##最初に出てくる指定した要素を削除
v.remove(a)
b=min(v)
v.remove(b)
v.append( (a+b)/2 )

for i in range(N-2):
        a=v[-1]
        remove(a)
        b=min(v)
        v.remove(b)
        v.append((a+b)/2)

print(v[-1])

Fixed submission:
##C problem
N = int(input())
v = list(map(float, input().split()))

vs = sorted(v)

for i in range(N-1):

    a=vs[0]

    b=vs[1]
    c=(a+b)/2
    vs.remove(b)
    vs.insert(0,c)
    vs.remove(a)
    #print(i)
    #print(vs)

print(vs[0])
Buggy python submission (verdict: Runtime Error):
import sys,os

f = open('a.txt', 'r')
sys.stdin = f

li = list(input().split())

A=int(li[0])
B=int(li[1])
T=int(li[2])

print(B*(T/A))

Fixed submission:
abt = input()
abt = list(map(int, abt.split(" ")))
output = (abt[2] + 0.5 ) //  abt[0] * abt[1]
print(int(output))