Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N=int(input())

a==N//100
b==(N-(a*100))//10
c==(N-(a*100+b*10))

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


Fixed submission:
N=int(input())

a=N//100
b=(N-(a*100))//10
c=(N-(a*100+b*10))

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

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

a==N//100
b==(N-(a*100))//10
c==(N-(a*100+b*10))

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


Fixed submission:
N=int(input())

a=N//100
b=(N-(a*100))//10
c=(N-(a*100+b*10))

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

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

a==N//100
b==(N-(a*100))//10
c==(N-(a*100+b*10))

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

Fixed submission:
N=int(input())

a=N//100
b=(N-(a*100))//10
c=(N-(a*100+b*10))

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

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

a==N//100
b==(N-(a*100))//10
c==(b-(a*100))//1

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


Fixed submission:
N=int(input())

a=N//100
b=(N-(a*100))//10
c=(N-(a*100+b*10))

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

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

a==N//100
b==(N-(a*100))//10
c==(b-(a*100))//1

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

Fixed submission:
N=int(input())

a=N//100
b=(N-(a*100))//10
c=(N-(a*100+b*10))

if ((a == 7) or (b == 7) or (c == 7)):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
A,B,C=map(int,input().split())

print ((C,A,B).split())


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

print (C,A,B)

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

print ((C,A,B).split=())


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

print (C,A,B)

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

print (int(C,A,B).split=())


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

print (C,A,B)

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

print (int(C,A,B).split)


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

print (C,A,B)

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

print (map(int(C,A,B).split))

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

print (C,A,B)

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

A=N[0]
B=N[1]
C=N[2]

print (C,A,B)

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

print (C,A,B)
Buggy python submission (verdict: Runtime Error):
n=list(input())

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


Fixed submission:
n=list(input())

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

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

if (n[3]==n[4]):
    pass
    if (n[5]==n[6]):
        print("Yes")
    else:
        print("No")


Fixed submission:
n=list(input())

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

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

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

Fixed submission:
n=list(input())

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

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

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


Fixed submission:
n=list(input())

if n[2]==n[3] and n[4]==n[5]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
N,M=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):
#!/usr/bin/env pypy3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import math,sys

n = int(sys.stdin.readline())
a = tuple(map(int,sys.stdin.readline().split()))
#n = int(input())
#a = list(map(int,input().split()))
g = math.gcd(a[0],a[1])
for i in range(2,n):
    g = math.gcd(g,a[i])
M = max(a)
acc = a[0]
for i in range(n):
    acc = math.gcd(acc,a[i])
if acc != 1:
    print("not coprime")
    exit()

LIMIT=max(a)
minPrime = [0]*(LIMIT+1)
minPrime[1] = 1
def make():
    for i in range(2,LIMIT+1):
        if minPrime[i] == 0:
            minPrime[i] = i
            #print(i)
            for j in range(i+i,LIMIT+1,i):
                #print(i,j)
                if minPrime[j] == 0:
                    minPrime[j] = i
make()
def factrial(N):
     ret = []
     while minPrime[N] != N:
         ret.append(minPrime[N])
         N = N//minPrime[N]
     if N != 1:
         ret.append(N)
     return ret

judge = set([])

for e in a:
    asf = set(factrial(e))
    if judge & asf != set():
        print("setwise coprime")
        exit()
    #judge |= asf
    judge = judge | asf #too slow
print("pairwise coprime")

Fixed submission:
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import sys,collections

D,T,S = map(int,sys.stdin.readline().split())

if D <= T * S:
    print("Yes")
    exit()
print("No")
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
# precise but slow
# from math import floor
# from fractions import Fraction
# a, b = input().split()
# a = int(a)
# b = Fraction(b)
# print(floor(a * b))
# fast but only decimal fixed point
import sys
from math import floor
from decimal import Decimal
N = int(sys.stdin.readline())
a = tuple(sys.stdin.readline().rstrip() for _ in range(N)) # multi line with single param
#a = [Decimal(e)*1000000000 for e in a]
a = [Decimal(e) for e in a]
ret = 0
for i in range(N):
    for j in range(i):
        if a[i]*a[j] == int(a[i]*a[j]):
            #print(a[i],a[j],a[i]*a[j])
            ret += 1
print(ret)

Fixed submission:
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
# precise but slow
# from math import floor
# from fractions import Fraction
# a, b = input().split()
# a = int(a)
# b = Fraction(b)
# print(floor(a * b))
# fast but only decimal fixed point
import sys,collections
from math import floor
from decimal import Decimal
N = int(sys.stdin.readline())
a = tuple(sys.stdin.readline().rstrip() for _ in range(N)) # multi line with single param
a = [int(Decimal(e)*1000000000) for e in a]

d = collections.defaultdict(int)
for e in a:#200 000
    b = e
    t = 0
    while b != 0 and b % 2 == 0:
        t += 1
        b = b//2
    b = e
    f = 0
    while b != 0 and b % 5 == 0:
        f += 1
        b = b//5
    d[(min(f,18),min(t,18))] += 1

ret = 0
for ft1,v1 in d.items():
    for ft2,v2 in d.items():
        f1,t1 = ft1
        f2,t2 = ft2
        if ft1 < ft2:
            continue
        if f1+f2 >= 18 and t1+t2 >= 18:
            if ft1 == ft2:
                ret += (v1*(v2-1))//2
            else:
                ret += v1*v2
print(ret)
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
INF = float("inf")
import sys,collections,heapq,math

N,K = map(int,sys.stdin.readline().split())
a = [[-b,b,1] for b in tuple(map(int,sys.stdin.readline().split()))] # single line with multi param
heapq.heapify(a)# a == [1,2,3]

for _ in range(K):
    _,ori,di = heapq.heappop(a)
    heapq.heappush(a, [-(ori)/(di+1),ori,di+1])

#print(a[0][0])
print(math.ceil(-a[0][0]))
# e = heapq.heappop(a) # e == 1
# heapq.heappush(a, 1) # a == [1,3,2]
# e = heqpq.heappushpop(a,4) # e == 1,a==[2,3,4]


Fixed submission:
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
INF = float("inf")
import sys,collections,heapq,math

N,K = map(int,sys.stdin.readline().split())
a = list(map(int,sys.stdin.readline().split())) # single line with multi param
a.sort(reverse=True)

ng = 0
ok = a[0]

def isOK(v):
    # within range
    # return key <= a[index]
    k = K
    i = 0
    while k >= 0 and i < N:
        #print("?",v,i,a[i],k,math.ceil(a[i] / v) -1,k - (math.ceil(a[i]/v) - 1))
        k = k - (math.ceil(a[i]/v) - 1)
        i += 1
    return k >= 0

while abs(ng-ok) > 1:
    mid = (ok+ng)//2
    #print(mid,isOK(mid))
    if isOK(mid):#ok condition?
        ok = mid #move ok
    else:
        ng = mid
#294924427
print(math.ceil(ok))

# a = [[-b,b,1] for b in tuple(map(int,sys.stdin.readline().split()))] # single line with multi param
# heapq.heapify(a)# a == [1,2,3]
# for _ in range(K):
#     _,ori,di = heapq.heappop(a)
#     heapq.heappush(a, [-(ori)/(di+1),ori,di+1])
# print(math.ceil(-a[0][0]))
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# n,m = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(sys.stdin.readline() for _ in range(n)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# n = int(sys.stdin.readline())
# INF = float("inf")
import sys,collections

A,B,C,K = map(int,sys.stdin.readline().split())

ALL = [1]*A+[0]*B+[-1]*C

print(sum(ALL[:K]))


Fixed submission:
#!/usr/bin/env python3
# n,m = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(sys.stdin.readline() for _ in range(n)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# n = int(sys.stdin.readline())
# INF = float("inf")
import sys,collections

A,B,C,K = map(int,sys.stdin.readline().split())

#ALL = [1]*A+[0]*B+[-1]*C
#print(sum(ALL[:K]))
print(1*min(A,K)+0*min(B,max(K-A,0))-1*min(C,max(K-A-B,0)))
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# n,m = map(int,sys.stdin.readline().split())
# a = list(map(int,sys.stdin.readline().split()))
# a = [sys.stdin.readline() for _ in range(n)]
# s = sys.stdin.readline().rstrip()
# n = int(sys.stdin.readline())
import sys,bisect,math
sys.setrecursionlimit(15000)

A,B,N = map(int,sys.stdin.readline().split())

m = -float("inf")
for i in range(N+1):
    m = max(m,math.floor(A*i/B)-A*math.floor(i/B))
print(m)
# x = B//2
# print(math.floor(A*x/B)-A*math.floor(x/B))


Fixed submission:
#!/usr/bin/env python3
# n,m = map(int,sys.stdin.readline().split())
# a = list(map(int,sys.stdin.readline().split()))
# a = [sys.stdin.readline() for _ in range(n)]
# s = sys.stdin.readline().rstrip()
# n = int(sys.stdin.readline())
import sys,bisect,math
sys.setrecursionlimit(15000)

A,B,N = map(int,sys.stdin.readline().split())

x = min(N,B-1)
m = math.floor(A*x/B)-A*math.floor(x/B)
print(m)
Buggy python submission (verdict: Time Limit Exceeded):
S = list(input())
Q = int(input())
reverse = False
for i in range(Q):
  q = input()
  if q == "1":
    reverse = not reverse
  else:
    q,f,c = q.split()
    if (f == "1" and not reverse) or (f == "2" and reverse):
      S = [c]+S
    else:
      S = S+[c]
if not reverse:
  print("".join(S))
else:
  print("".join(reversed(S)))

Fixed submission:
import collections
S = collections.deque(input())
Q = int(input())
reverse = False
for i in range(Q):
  q = input()
  if q == "1":
    reverse = not reverse
  else:
    q,f,c = q.split()
    if (f == "1" and not reverse) or (f == "2" and reverse):
      S.appendleft(c)
    else:
      S.append(c)
if not reverse:
  print("".join(S))
else:
  print("".join(reversed(S)))

Buggy python submission (verdict: Time Limit Exceeded):
S = list(input())
Q = int(input())
for i in range(Q):
  #print(S)
  q = input()
  if q == "1":
    S.reverse()
    #print("1",S)
  else:
    q,f,c = q.split()
    if f == "1":
      S = [c]+S
    else:
      S = S+[c]
print("".join(S))

Fixed submission:
import collections
S = collections.deque(input())
Q = int(input())
reverse = False
for i in range(Q):
  q = input()
  if q == "1":
    reverse = not reverse
  else:
    q,f,c = q.split()
    if (f == "1" and not reverse) or (f == "2" and reverse):
      S.appendleft(c)
    else:
      S.append(c)
if not reverse:
  print("".join(S))
else:
  print("".join(reversed(S)))
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# n,m = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(sys.stdin.readline() for _ in range(n)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# n = int(sys.stdin.readline())
# INF = float("inf")
import sys,collections
N,Q = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
S = sys.stdin.readline().rstrip()
se = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(Q)) # multi line with multi param

INF = float("inf")
com = [0]*(N+1)

for i in range(N):
    com[i+1] = com[i]
    if S[i] == "A" and S[i+1] == "C":
        com[i+1] += 1

for s,e in se:
    print(com[e-1] - com[s-1])


Fixed submission:
#!/usr/bin/env python3
# n,m = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(sys.stdin.readline() for _ in range(n)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# n = int(sys.stdin.readline())
# INF = float("inf")
import sys,collections
N,Q = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
S = sys.stdin.readline().rstrip()
se = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(Q)) # multi line with multi param

INF = float("inf")
com = [0]*(N+1)

for i in range(N):
    com[i+1] = com[i]
    if S[i] == "A" and S[min(i+1,N-1)] == "C":
        com[i+1] += 1

for s,e in se:
    print(com[e-1] - com[s-1])
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = map(int,input())
maxi = 0
for i in range(N-1):
  maxi = max(maxi,A[i]-A[i+1])
print(maxi)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
maxi = 0
mini = float("inf")
for n in A:
  maxi = max(maxi,n)
  mini = min(mini,n)
print(maxi-mini)
Buggy python submission (verdict: Runtime Error):
A = list(map(int,input().split()))
A.sort()
ret = 0
ret += A[2]-A[1]
A[1] += ret
A[0] += ret
ret += (A[1]-A[0])//2
if (A[1]-A[0])%2==1:
  ret += 2
print(ret)


Fixed submission:
N = int(input())
mini = float("inf")
for A in range(1,N-1+1):
  mini = min(mini,sum([int(digit) for digit in str(A)])+sum([int(digit) for digit in str(N-A)]))
print(mini)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = map(int, input().split())
a.sort()
print(sum(a[0::2])-sum(a[1::2]))

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
print(sum(a[0::2])-sum(a[1::2]))
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())
ret = 0
for a in range(A):
  for b in range(B):
    for c in range(C):
      if 500*a+100*b+50*c = X:
        ret += 1
print(ret)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
ret = 0
for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if 500*a+100*b+50*c == X:
        ret += 1
print(ret)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = set()
for i in range(N):
  set.add(int(input()))
print(len(a))

Fixed submission:
N = int(input())
a = set()
for i in range(N):
  a.add(int(input()))
print(len(a))
Buggy python submission (verdict: Time Limit Exceeded):
N,A,B = map(int, input().split())
ret = 0
for i in range(N):
  c = 0
  while i:
    c,mod = divmod(i,10)
    c += mod
  if A <= c and c <= B:
    ret += i
print(ret)

Fixed submission:
N,A,B = map(int, input().split())
ret = 0
for i in range(N+1):
  s = sum([int(c) for c in str(i)])
  if A <= s and s <= B:
    ret += i
print(ret)
Buggy python submission (verdict: Runtime Error):
s = sorted(int(input()))
t = sorted(int(input()),reverse=True)
if s<t:
  print("Yes")
else:
  print("No")

Fixed submission:
s = sorted(input())
t = sorted(input(),reverse=True)
if s<t:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import sys

N,C = map(int,sys.stdin.readline().split())
stc = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
M = 10**5
imos_s=[set() for _ in range(M+1)]
imos_e=[set() for _ in range(M+1)]

for s,t,c in stc:
    imos_s[s].add(c)
    imos_e[t+1].add(c)

#print(imos_s)
#print(imos_e)
s = set()
imos=[set()]*(M+1)
ret = 0
for i in range(M):
    imos[i+1] = (imos[i]-imos_e[i])|(imos_s[i])
    ret = max(ret,len(imos[i+1]))
#print(imos)
print(ret)

Fixed submission:
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import sys

N,C = map(int,sys.stdin.readline().split())
stc = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
M = 10**5
imos=[[0]*(M+1) for _ in range(C+1)]

for s,t,c in stc:
    imos[c][s] += 1
    if t+1 < M+1:
        imos[c][t+1] -= 1

#print(imos)
s = set()
ret = 0
for i in range(M):
    for c in range(C+1):
        imos[c][i+1] += imos[c][i]
    ret = max(ret,sum(min(1,imos[c][i+1]) for c in range(C+1)))
#print(imos)
print(ret)
Buggy python submission (verdict: Runtime Error):
m_t = 0
m_s = 0
for a in range(F//100*A+1):
  for b in range((F-100*A*a)//(B)+1):
    for c in range((F-A*a*100-B*b*100)//C+1):
      d = 0
      while (100*A*a+100*B*b) > 0 and 100*A*a+100*B*b+C*c+D*d < F and (C*c+D*d)/(100*A*a+100*B*b) <= E/100:
        dens = (C*c+D*d)/(100*A*a+100*B*b)
        if (C*c+D*d)/(100*A*a+100*B*b) == E/100:
          print(100*A*a+100*B*b+C*c+D*d,C*c+D*d)
          exit()
        elif m_d < dens:
          m_d = dens
          m_t = 100*A*a+100*B*b+C*c+D*d
          m_s = C*c+D*d
        d += 1
print(m_t,m_s)



Fixed submission:
A,B,C,D,E,F = map(int,input().split())
m_d = 0
m_t = 100*A
m_s = 0
for a in range(F//100*A+1):
  for b in range((F-100*A*a)//(100*B)+1):
    for c in range((F-A*a*100-B*b*100)//C+1):
      d = 0
      while (100*A*a+100*B*b) > 0 and 100*A*a+100*B*b+C*c+D*d <= F and (C*c+D*d)/(100*A*a+100*B*b) <= E/100:
        dens = (C*c+D*d)/(100*A*a+100*B*b)
        if dens == E/100:
          print(100*A*a+100*B*b+C*c+D*d,C*c+D*d)
          exit()
        elif m_d < dens:
          m_d = dens
          m_t = 100*A*a+100*B*b+C*c+D*d
          m_s = C*c+D*d
        d += 1
print(m_t,m_s)
Buggy python submission (verdict: Runtime Error):
s = input()
b = [0]*25
for c in s:
  b[ord(c)-ord("a")]+=1
for i,c in enumerate(b):
  if c == 0:
    print(chr(i+ord("a")))
    exit()
print("None")

Fixed submission:
s = input()
b = [0]*26
for c in s:
  b[ord(c)-ord("a")]+=1
for i,c in enumerate(b):
  if c == 0:
    print(chr(i+ord("a")))
    exit()
print("None")
Buggy python submission (verdict: Runtime Error):
import math
A,B,C=map(int,input().split())
lcm = A*B//math.gcd(A,B)
#A*(i+j)%B=C
#A*(i+j)=BX+C
i=A
while i<=lcm:
  if i%B==C:
    print("YES")
    exit()
  i*=A
print("NO")

Fixed submission:
import fractions
A,B,C=map(int,input().split())
lcm = A*B#//fractions.gcd(A,B)
#A*(i+j)%B=C
#A*(i+j)=BX+C
i=A
while i<=lcm:
  #print(i,lcm)
  if i%B==C:
    print("YES")
    exit()
  i+=A
print("NO")
Buggy python submission (verdict: Runtime Error):
s=input()
ia=None
iz=None
for i,c in s:
  if ia==None and c=="a":
    ia=i
  if c=="z":
    iz=i
print(iz-ia+1)

Fixed submission:
s=input()
ia=None
iz=None
for i,c in enumerate(s):
  if ia==None and c=="A":
    ia=i
  if c=="Z":
    iz=i
print(iz-ia+1)