Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
print(100 ** int(input()) * int(input())

Fixed submission:
D, N = map(int, input().split())
print(100 ** D * N if N != 100 else 100 ** D * 101)
Buggy python submission (verdict: Runtime Error):
def rec(s):
  if s == '':
    return True
  else:
    res = False
    res = res or rec(s[7:]) if len(s) > 6 and s[0:7] == 'dreamer' else res
    res = res or rec(s[5:]) if len(s) > 4 and s[0:5] == 'dream' else res
    res = res or rec(s[5:]) if len(s) > 4 and s[0:5] == 'erase' else res
    res = res or rec(s[6:]) if len(s) > 5 and s[0:6] == 'eraser' else res
    return res
  
print('YES' if rec(input()) else 'NO')

Fixed submission:
def solve(s):
  while True:
    if s == '':
      return True
    else:
      if s[0:7] == 'dreamer'[::-1]:
        s = s[7:]
      elif s[0:5] == 'dream'[::-1]:
        s = s[5:]
      elif s[0:5] == 'erase'[::-1]:
        s = s[5:]
      elif s[0:6] == 'eraser'[::-1]:
        s = s[6:]
      else:
        return False
  
print('YES' if solve(input()[::-1]) else 'NO')

Buggy python submission (verdict: Runtime Error):
def rec(s):
  if s == '':
    return True
  else:
    res = False
    res = res or rec(s[7:]) if s[0:7] == 'dreamer' else res
    res = res or rec(s[5:]) if s[0:5] == 'dream' else res
    res = res or rec(s[5:]) if s[0:5] == 'erase' else res
    res = res or rec(s[6:]) if s[0:6] == 'eraser' else res
    return res
  
print('YES' if rec(input()) else 'NO')

Fixed submission:
def solve(s):
  while True:
    if s == '':
      return True
    else:
      if s[0:7] == 'dreamer'[::-1]:
        s = s[7:]
      elif s[0:5] == 'dream'[::-1]:
        s = s[5:]
      elif s[0:5] == 'erase'[::-1]:
        s = s[5:]
      elif s[0:6] == 'eraser'[::-1]:
        s = s[6:]
      else:
        return False
  
print('YES' if solve(input()[::-1]) else 'NO')
Buggy python submission (verdict: Runtime Error):
s = list[map(int, input().split())]
a = s.count(7)
if a == 0:
  print('No')
else:
  print('Yes')

Fixed submission:
s = input()
if '7' in s:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
s = input()

if s[3] == s[4] and s[5] == s[6]:
  print('Yes')
else:
  print('No')

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

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

Fixed submission:
s = input()
if s[2] == s[3] and s[4] == s[5]:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
num = 2//n*(n-1) + 2//m*(m-1)
print(num)

Fixed submission:
n, m = map(int, input().split())
num = ((n**2-n)//2) + ((m**2-m)//2)
print(num)

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

Fixed submission:
n, m = map(int, input().split())
num = ((n**2-n)//2) + ((m**2-m)//2)
print(num)
Buggy python submission (verdict: Runtime Error):
int(input(a,b))
if a >= 10:
  x = b
else:
  x = b+100*(10-a)
print(x)

Fixed submission:
a,b=map(int, input().split())
if a >= 10:
  x = b
else:
  x = b+100*(10-a)
print(x)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input())
if a == b == c or a != b != c:
  print('No')
else:
  print('Yes')

Fixed submission:
a, b, c = map(int, input().split())
if a == b == c == a or a != b != c != a:
  print('No')
else:
  print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())

if k == 1:
  print(0)
else:
  mem = 0
  while True:
    mem = n
    n = abs(n-k)
    if mem <= n:
      print(mem)
      break

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

a = n % k
b = abs(a-k)
if a > b:
  print(b)
else:
  print(a)
Buggy python submission (verdict: Runtime Error):
today = input()
if (today == "Sunny") print("Cloudy")
elif (today == "Cloudy") print("Rainy")
else print("Sunny")

Fixed submission:
today = input()
if (today == "Sunny"): print("Cloudy")
elif (today == "Cloudy"): print("Rainy")
else: print("Sunny")
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce
a = int(input())
result = 0
# target_list = []
for x in range(1, a+1):
    for y in range(1, a+1):
        for z in range(1, a+1):
            result += reduce(math.gcd, (x, y, z))
            # target_list.append((x, y, z))

# for target in target_list:
    # result += reduce(math.gcd, target)
print(result)

Fixed submission:
import math
from functools import reduce
a = int(input())
result = 0
for x in range(1, a+1):
    for y in range(1, a+1):
        for z in range(1, a+1):
            result += reduce(math.gcd, (x, y, z))
            
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce
a = int(input())

target_list = []
for x in range(1, a+1):
    for y in range(1, a+1):
        for z in range(1, a+1):
            target_list.append((x, y, z))
result = 0
for target in target_list:
    result += reduce(math.gcd, target)
print(result)

Fixed submission:
import math
from functools import reduce
a = int(input())
result = 0
for x in range(1, a+1):
    for y in range(1, a+1):
        for z in range(1, a+1):
            result += reduce(math.gcd, (x, y, z))
            
print(result)
Buggy python submission (verdict: Runtime Error):
a = input()
third = a % 100
second = a % 10 - thrid * 10
first = a - (third *100 +second*10)
if(third == 7 or second == 7 or first == 7):
  print("Yes")
else:
  print("No")

Fixed submission:
a = int(input())
third = a // 100
second = a // 10 - third * 10
first = a - (third *100 +second*10)
if(third == 7 or second == 7 or first == 7):
  print("Yes")
else:
  print("No")

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

if 7 in N:
  print("Yes")
else:
  print("No")

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

if 7 in N:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
a,b=map(int,input().split())
s1=len(bin(a))-2
s2=len(bin(b))-2
sum=a
if s1!=s2:
    for i in range(a+1,2**s1):
        sum=i^sum
    for i in range(2**(s2-1),b+1):
        sum=i^sum
    
else:
    for i in range(a+1,b+1):
        sum=i^sum
print(sum)

Fixed submission:
a,b=map(int,input().split())
a1=a//4+1
b1=b//4
sum=a
k=a+1
while k<a1*4:
    sum=sum^k
    k+=1
k=b1*4
while k<=b:
    sum=sum^k
    k+=1
print(sum)
Buggy python submission (verdict: Runtime Error):
x=int(input())
y=int(input())
print(x+y//2)

Fixed submission:
x,y=(int(n) for n in input().split())
print(x+y//2)
Buggy python submission (verdict: Runtime Error):
n=int(input())
i=1
while i*i<=n:
    i+=1
print(i-1)*(i-1)


Fixed submission:
n=int(input())
i=1
while i*i<=n:
    i+=1
print((i-1)*(i-1))

Buggy python submission (verdict: Runtime Error):
n=int(input())
i=1
while i^2<=N:
    i+=1
print(N-1)

Fixed submission:
n=int(input())
i=1
while i*i<=n:
    i+=1
print((i-1)*(i-1))
Buggy python submission (verdict: Runtime Error):
n = input()
return "7" in n

Fixed submission:
n = input()
if "7" in n:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):

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

n = int(input())
s = 0
for i in range(1, n+1):
  for j in range(1, n + 1):
    for k in range(1, n+1):
      s += gcd(gcd(i, j), k)
print(s)
    

Fixed submission:

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

def permutation(n):
    if n == 1:
        return 1
    elif n == 2:
        return 3
    else:
        return 6

def solve():
    n = int(input())
    s = 0
    for i in range(1, n + 1):
        for j in range(i, n + 1):
            for k in range(j, n + 1):
                diff = 1
                if j != k:
                    diff += 1
                if i != j:
                    diff += 1
                s += gcd(i, gcd(j, k)) * permutation(diff)

    print(s)
    return s

solve()
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=list(input())
c=0
for i in range(1,n+1):
    for j in range(i+1,n+1):
        if s[i-1]==s[j-1]:
            continue
        for k in range(j+1,n+1):
            if s[k-1]!=s[j-1] and s[i-1]!=s[k-1]:
                if j-i != k-j:
                    c+=1
print(c)

Fixed submission:
N = int(input())
S = input()
 
r = S.count('R')
g = S.count('G')
b = S.count('B')
max = r * g * b 
 
count = 0
for i in range(N-2):
	for j in range(i+1, N-1):
		k = 2 * j - i
		if k > N - 1:
			break
	
		if S[i] != S[j] and S[j] != S[k] and S[i] != S[k]:
			count += 1
		
		
 
print(max - count)

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=list(input())
c=0
for i in range(1,n+1):
    for j in range(i+1,n+1):
        if if s[i-1]==s[j-1]:
            continue
        for k in range(j+1,n+1):
            if s[k-1]!=s[j-1] and s[i-1]!=s[k-1]:
                if j-i != k-j:
                    c+=1
print(c)

Fixed submission:
N = int(input())
S = input()
 
r = S.count('R')
g = S.count('G')
b = S.count('B')
max = r * g * b 
 
count = 0
for i in range(N-2):
	for j in range(i+1, N-1):
		k = 2 * j - i
		if k > N - 1:
			break
	
		if S[i] != S[j] and S[j] != S[k] and S[i] != S[k]:
			count += 1
		
		
 
print(max - count)

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=list(input())
c=0
for i in range(1,n+1):
    for j in range(i+1,n+1):
        if if s[i-1]==s[j-1]:
            break
        for k in range(j+1,n+1):
            if s[k-1]!=s[j-1] and s[i-1]!=s[k-1]:
                if j-i != k-j:
                    c+=1
print(c)

Fixed submission:
N = int(input())
S = input()
 
r = S.count('R')
g = S.count('G')
b = S.count('B')
max = r * g * b 
 
count = 0
for i in range(N-2):
	for j in range(i+1, N-1):
		k = 2 * j - i
		if k > N - 1:
			break
	
		if S[i] != S[j] and S[j] != S[k] and S[i] != S[k]:
			count += 1
		
		
 
print(max - count)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=list(input())
c=0
for i in range(1,n+1):
    for j in range(i+1,n+1):
        for k in range(j+1,n+1):
            if s[i-1]!=s[j-1] and s[k-1]!=s[j-1] and s[i-1]!=s[k-1]:
                if j-i != k-j:
                    c+=1
print(c)

Fixed submission:
N = int(input())
S = input()
 
r = S.count('R')
g = S.count('G')
b = S.count('B')
max = r * g * b 
 
count = 0
for i in range(N-2):
	for j in range(i+1, N-1):
		k = 2 * j - i
		if k > N - 1:
			break
	
		if S[i] != S[j] and S[j] != S[k] and S[i] != S[k]:
			count += 1
		
		
 
print(max - count)
Buggy python submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Fixed submission:
print(input().count("1"))

Buggy python submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1"))
print(round(ans))

Fixed submission:
print(input().count("1"))

Buggy python submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Fixed submission:
print(input().count("1"))

Buggy python submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))


Fixed submission:
print(input().count("1"))

Buggy python submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Fixed submission:
print(input().count("1"))
Buggy python submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Fixed submission:
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))
Buggy python submission (verdict: Runtime Error):
n = int(inupt())
sum = 0
for i in range(1, n+1):
  if n % 3 == 0 or n % 5 == 0:
    sum += i
    
print(sum)

Fixed submission:
n = int(input())
sum = 0
for i in range(1, n+1):
  if not (i % 3 == 0 or i % 5 == 0):
    sum += i
    
print(sum)
Buggy python submission (verdict: Runtime Error):
c =0

N = int(input())+1
S = tuple(input())


for i in range(1,N):
    for j in range(1,N):
        if i > j:
                continue
        elif S[i-1] == S[j-1]:
                continue
        for k in range(1,N):
            if j > k:
                continue
            elif S[i-1] == S[k-1] or S[j-1] == S[k-1]:
                continue
            elif j - i == k - j:
                continue
            else:
                c += 1
print(c)

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

Buggy python submission (verdict: Runtime Error):
c =0

N = int(input())+1
S = tuple(input())


for i in range(1,N):
    for j in range(1,N):
        if i > j:
                continue
        elif S[i-1] == S[j-1]:
                continue
        for k in range(1,N):
            if j > k:
                continue
            elif S[i-1] == S[k-1] or S[j-1] == S[k-1]:
                continue
            elif j - i == k - j:
                continue
            else:
                c += 1
print(c)
                    

Fixed submission:
n = input()
print('Yes') if '7' in n else print('No')
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

c = 0
c += N(N-2)/2
c += M(M-2)/2

print(c)



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

c = 0
c += (N*(N-1))/2
c += (M*(M-1))/2

print(int(c))

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

c = 0
c += N(N-2)/2
c += M(M-2)/2

print(c)

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

c = 0
c += (N*(N-1))/2
c += (M*(M-1))/2

print(int(c))
Buggy python submission (verdict: Runtime Error):
l = input()

v = (l/3)**2

print(v)



Fixed submission:
l = int(input())

v = (l/3)**3

print(v)
Buggy python submission (verdict: Runtime Error):
s = map(int, input().sprit)

for i in range(len(s)):
    if s[i] in s:
        print('Yes')
        break
    else: 
        print('No')


Fixed submission:
s =input()

c = s.count('A')

if c == 3:
    print("No")
elif c == 0:
    print('No')
else: 
    print('Yes')
Buggy python submission (verdict: Runtime Error):
n, a, b = map(int, input().split())

t = n//(a+b)

if t == 0 and n < a:
    c += n
    print(c)
elif t == 0 and n >= a:
    c += a
    print(a)
elif t > 0:
    c += t * a
    r = n%(a+b)
    if r == 0:
        print(c)
    elif r < a:
        c += r 
        print(c)
    elif r > a:
        c += a
        print(c)

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

t = n//(a+b)
c=0

if t == 0 and n < a:
    c += n
    print(c)
elif t == 0 and n >= a:
    c += a
    print(c)
elif t > 0:
    c += t * a
    r = n%(a+b)
    if r == 0:
        print(c)
    elif r < a:
        c += r 
        print(c)
    elif r > a:
        c += a
        print(c)
Buggy python submission (verdict: Runtime Error):
import math
a, b = map(int, input().split())
A = math.floor(a/0.08)
B = math.floor((a/0.8)/0.1)


c = math.gcd(A, B)
if c == 1 or c >= 100:
    print(-1)
else:
    print(c)

Fixed submission:

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

c =0 
for n in range(0,10000):
    taxa = int(n*8/100)
    taxb = int(n*10/100)
    if a == taxa and b == taxb:
        print(n)
        break
    else:
        c += 1
if c > 9999:
    print(-1)

Buggy python submission (verdict: Runtime Error):
import math
a, b = map(int, input().split())
A = math.floor(a/0.08)
B = math.floor((a/0.8)/0.1)


c = math.gcd(A, B)
if c == 1:
    print(-1)
else:
    print(c)

Fixed submission:

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

c =0 
for n in range(0,10000):
    taxa = int(n*8/100)
    taxb = int(n*10/100)
    if a == taxa and b == taxb:
        print(n)
        break
    else:
        c += 1
if c > 9999:
    print(-1)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())

lis = []
for i in range(m):
    lis.append(list(map(int, input().split())))
    
ans = [0,0,0]
if n == 2:
    ans[1] = 1
elif n == 3:
    ans[0] = 1
    
k = 0
out = []

for i in lis:
    if i[0] not in out:
        ans[int(i[0]-1)] = int(i[1])
        out.append(i[0])
    elif i[0] in out and i[1] != ans[i[0]-1]:
        k += 1

inte = ans[0] * 100 + ans[1]*10 + ans[2]
    
    
if inte > 0 and k ==0:
    print(inte)
else:
    print(-1)


Fixed submission:
n = int(input())

p = n//2 + n%2
print(p)

Buggy python submission (verdict: Runtime Error):
f = list(map(int, input().split()))
s = list(map(int, input().split()))
t = list(map(int, input().split()))
n = int(input())
k = []
for i in range(n):
    k.append(int(input()))

lis = []

lis.append(f)
lis.append(s)
lis.append(t)

ans = 0

for i in lis:
    c =0
    for n in range(len(i)):
        if i[n] in k:
            i[n] = 'X'
            c += 1
            if c == 3:
                ans +=1
                break

if f[0] == 'X' and s[0] == 'X' and t[0] == 'X':
    ans +=1
elif f[1] == 'X' and s[1] == 'X' and t[1] == 'X':
    ans += 1
elif f[2] == 'X' and s[2] == 'X' and t[2] == 'X':
    ans += 1
elif f[0] == 'X' and s[1] == 'X' and t[3] == 'X':
    ans += 1
elif f[3] == 'X' and s[2] == 'X' and t[1] == 'X':
    ans += 1
    
if ans >= 1:
    print('Yes')
else:
    print('No')
        

Fixed submission:
n = int(input())

p = n//2 + n%2
print(p)
Buggy python submission (verdict: Runtime Error):
word = map(str, input())

if word[2]==word[3] and word[4]==word[5]:
  print('Yes')
else:
  print('No')

Fixed submission:
word = str(input())
 
if word[2]==word[3] and word[4]==word[5]:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
print('bust') if sum(input().split()) >= 22 else print('win')

Fixed submission:
print('bust') if (sum(map(int, input().split()))) >= 22 else print('win')
Buggy python submission (verdict: Runtime Error):
s = str(input())
 
length = len(s)
 
n = length//2
 
m = 0
 
for i in range(n):
  x = (i+1)*(-1)
  if s[i]!=s[k]:
    m += 1
print(m)

Fixed submission:
s = str(input())
 
length = len(s)
 
n = length//2
 
m = 0
 
for i in range(n):
  x = (i+1)*(-1)
  if s[i]!=s[x]:
    m += 1
print(m)

Buggy python submission (verdict: Runtime Error):
s = str(input())
 
length = len(s)
 
n = length//2
 
m = 0
 
for i in range(n):
  x = (i+1)*(-1)
  if s[i]==s[k]:
    m += 1
print(m)
    

Fixed submission:
s = str(input())
 
length = len(s)
 
n = length//2
 
m = 0
 
for i in range(n):
  x = (i+1)*(-1)
  if s[i]!=s[x]:
    m += 1
print(m)

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

length = len(s)

n = length//2

m = 0

for i in range(length):
  x = (i+1)*(-1)
  if s[i]==s[k]:
    m += 1
print(m)
    

Fixed submission:
s = str(input())
 
length = len(s)
 
n = length//2
 
m = 0
 
for i in range(n):
  x = (i+1)*(-1)
  if s[i]!=s[x]:
    m += 1
print(m)
Buggy python submission (verdict: Runtime Error):
x = int(input)

k = 0

for i in range(1,10):
  for j in range (1,10):
    if x==i*j:
      k += k+1
      
print('No') if k==0 else print('Yes')

Fixed submission:
x = int(input())
 
k = 0
 
for i in range(1,10):
  for j in range (1,10):
    if x==i*j:
      k += k+1
      
print('No') if k==0 else print('Yes')
Buggy python submission (verdict: Runtime Error):
s = str(input())
t = str(input())

ans = 0

for in range(3):
  if s[i]==t[i]:
    ans += 1
print(ans)

Fixed submission:
s = str(input())
t = str(input())
 
ans = 0
 
for i in range(3):
  if s[i]==t[i]:
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
bottle1, water, bottle2 = map(int, input().split())
empty = bottle1 - water
if empty =< bottle2:
  print(bottle2 - empty)
else:
  print(0)

Fixed submission:
bottle1, water, bottle2 = map(int, input().split())
empty = bottle1 - water
if empty <= bottle2:
  print(bottle2 - empty)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
a = int(input())
 
if a[0]==a[1]==a[2] or a[1]==a[2]==a[3] or a[0]==a[1]==a[2]==a[3]:
  print('Yes')
else:
  print('No')

Fixed submission:
a = str(input())
 
if a[0]==a[1]==a[2] or a[1]==a[2]==a[3] or a[0]==a[1]==a[2]==a[3]:
  print('Yes')
else:
  print('No')

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

if a[0]==a[1]==a[2] or a[1]==a[2]==a[3] a[0]==a[1]==a[2]==a[3]:
  print('Yes')
else:
  print('No')

Fixed submission:
a = str(input())
 
if a[0]==a[1]==a[2] or a[1]==a[2]==a[3] or a[0]==a[1]==a[2]==a[3]:
  print('Yes')
else:
  print('No')

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

if a==b==c or b==c==d or a==b==c==d:
  print('Yes')
else:
  print('No')

Fixed submission:
a = str(input())
 
if a[0]==a[1]==a[2] or a[1]==a[2]==a[3] or a[0]==a[1]==a[2]==a[3]:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
meals = int(input)
price15 = (15*800)-200
print((meals//15)*price15+800*(meals%15))

Fixed submission:
meals = int(input())
price15 = (15*800)-200
print((meals//15)*price15+800*(meals%15))
Buggy python submission (verdict: Runtime Error):
a, b, c = list(str, input().split())

print(a[0] + b[0] + c[0])

Fixed submission:
a, b, c = map(str, input().split())
 
print(a[0] + b[0] + c[0])
Buggy python submission (verdict: Runtime Error):
n = input()

x = 0

for i in range(n):
  x += (i+1)
  
print(x)

Fixed submission:
n = int(input())
 
x = 0
 
for i in range(n):
  x += (i+1)
  
print(x)
Buggy python submission (verdict: Runtime Error):
n = str(input())

ans = ''

for i in range(len(n)):
  if n[i] == 'B':
    ans = ans[-1]
  elif n[i] == '0':
    ans += '0'
  elif n[i] == '1':
    ans += '1'

print(ans)

Fixed submission:
n = str(input())

ans = ''

for i in range(len(n)):
  if n[i] == 'B':
    ans = ans[:-1]
  elif n[i] == '0':
    ans += '0'
  elif n[i] == '1':
    ans += '1'

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
ans = S.count("R")*S.count("G")*S.count("B")

for i in range(N):
  for j in range(i+1,N):
      k = 2*j-i
      if N>k and S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
          ans-=1
          
print(ans)

Fixed submission:
if "7" in input():
	print("Yes")
else:
	print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import math

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

Fixed submission:
def main():
  from math import gcd
  k = int(input())
  
  total = 0
  for a in range(1,k+1):
    for b in range(1,k+1):
      temp = gcd(a, b)
      for c in range(1,k+1):
        total+= gcd(temp, c)
  print(total)
main()