Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

mae = deque()
usiro=deque()

s=input()
kai=int(input())

siji=[]*kai

for i in range(kai):
    siji.append(input())


state=1
for i in range(kai):
    si=siji[i]
    if(si[0]=='1'):
        state*=-1
    else:
        _,f,c=si.split()
        f=int(f)
        if(state==-1):
            f=3-f
        if(f==1):
            mae. appendleft(c)
        else:
            usiro.append(c)

ans=deque()
for m in mae:
    if(state==1):
        ans.append(m)
    else:
        ans.appendleft(m)
for smoji in s:
    if(state==1):
        ans.append(smoji)
    else:
        ans.appendleft(smoji)
for u in usiro:
    if(state==1):
        ans.append(u)
    else:
        ans.appendleft(u)

kotae=""
for a in ans:
    kotae+=a
print(kotae)

Fixed submission:
from collections import deque

mae = deque()
usiro=deque()

s=input()
kai=int(input())

siji=[]*kai

for i in range(kai):
    siji.append(input())


state=1
for i in range(kai):
    si=siji[i]
    if(si[0]=='1'):
        state*=-1
    else:
        _,f,c=si.split()
        f=int(f)
        if(state==-1):
            f=3-f
        if(f==1):
            mae. appendleft(c)
        else:
            usiro.append(c)

ans=deque()
for m in mae:
    if(state==1):
        ans.append(m)
    else:
        ans.appendleft(m)
for smoji in s:
    if(state==1):
        ans.append(smoji)
    else:
        ans.appendleft(smoji)
for u in usiro:
    if(state==1):
        ans.append(u)
    else:
        ans.appendleft(u)

kotae="".join(ans)
print(kotae)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
sitei=[]
for i in range(m):
    a,b=map(int,input().split())
    sitei.append([a-1,b])

ans=[-1]*n

kano=True
for i in range(m):
    if(ans[sitei[i][0]]==-1):
        ans[sitei[i][0]]=sitei[i][1]
    elif(ans[sitei[i][0]]!=sitei[i][1]):
        kano=False

if(ans[0]==0):
    kano=False
if(ans[0]==-1):
    ans[0]==1

if(not kano):
    print(-1)
else:
    kotae=0
    for i in range(m):
        if(ans[i]==-1):
            pass
            #kotae+="0"
        else:
            kotae+=ans[i]*(10**(n-i-1))
    print(kotae)

Fixed submission:
n,m=map(int,input().split())
sitei=[]
for i in range(m):
    a,b=map(int,input().split())
    sitei.append([a-1,b])

ans=[-1]*n

kano=True
for i in range(m):
    if(ans[sitei[i][0]]==-1):
        ans[sitei[i][0]]=sitei[i][1]
    elif(ans[sitei[i][0]]!=sitei[i][1]):
        kano=False

if(n!=1):
    if(ans[0]==0):
        kano=False
    if(ans[0]==-1):
        ans[0]=1


if(not kano):
    print(-1)
else:
    kotae=0
    for i in range(n):
        if(ans[i]==-1):
            pass
            #kotae+="0"
        else:
            kotae+=ans[i]*(10**(n-i-1))
    print(kotae)

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
sitei=[]
for i in range(m):
    a,b=map(int,input().split())
    sitei.append([a-1,b])

ans=[-1]*n

kano=True
for i in range(m):
    if(ans[sitei[i][0]]==-1):
        ans[sitei[i][0]]=sitei[i][1]
    elif(ans[sitei[i][0]]!=sitei[i][1]):
        kano=False

if(ans[0]==0):
    kano=False
if(ans[0]==-1):
    ans[0]==1

if(not kano):
    print(-1)
else:
    kotae=""
    for i in range(m):
        if(ans[i]==-1):
            kotae+="0"
        else:
            kotae+=str(ans[i])
    print(kotae)

Fixed submission:
n,m=map(int,input().split())
sitei=[]
for i in range(m):
    a,b=map(int,input().split())
    sitei.append([a-1,b])

ans=[-1]*n

kano=True
for i in range(m):
    if(ans[sitei[i][0]]==-1):
        ans[sitei[i][0]]=sitei[i][1]
    elif(ans[sitei[i][0]]!=sitei[i][1]):
        kano=False

if(n!=1):
    if(ans[0]==0):
        kano=False
    if(ans[0]==-1):
        ans[0]=1


if(not kano):
    print(-1)
else:
    kotae=0
    for i in range(n):
        if(ans[i]==-1):
            pass
            #kotae+="0"
        else:
            kotae+=ans[i]*(10**(n-i-1))
    print(kotae)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
ans=0
for i in range(n):
  ans+=i
print(ans)

Fixed submission:
n=int(input())
print(n*(n-1)//2)
Buggy python submission (verdict: Runtime Error):
import math

def Lcm(a,b):
    return int(a*b/math.gcd(a,b))
def Kosu(min,max,k):
    if(min%k==0):
        tyousei=1
    return int(max/k)-int((min-1)/k)

min,max,a,b=map(int,input().split())
c=Lcm(a,b)
print(max+1-min-Kosu(min,max,a)-Kosu(min,max,b)+Kosu(min,max,c))

Fixed submission:
import fractions

def Lcm(a,b):
    return a*b//fractions.gcd(a,b)
def Kosu(min,max,k):
    if(min%k==0):
        tyousei=1
    return max//k-(min-1)//k

min,max,a,b=map(int,input().split())
c=Lcm(a,b)
print(max+1-min-Kosu(min,max,a)-Kosu(min,max,b)+Kosu(min,max,c))

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

def Lcm(a,b):
    return a*b//math.gcd(a,b)
def Kosu(min,max,k):
    return max//k-(min-1)//k

min,max,a,b=map(int,input().split())
c=Lcm(a,b)
print(max+1-min-Kosu(min,max,a)-Kosu(min,max,b)+Kosu(min,max,c))



Fixed submission:
import fractions

def Lcm(a,b):
    return a*b//fractions.gcd(a,b)
def Kosu(min,max,k):
    if(min%k==0):
        tyousei=1
    return max//k-(min-1)//k

min,max,a,b=map(int,input().split())
c=Lcm(a,b)
print(max+1-min-Kosu(min,max,a)-Kosu(min,max,b)+Kosu(min,max,c))
Buggy python submission (verdict: Time Limit Exceeded):
d = 10 ** 9 + 7
n = int(input())
lista = [int(x) for x in input().split()]
for k in lista:
    k %= d

total = 0
for i in range(n-1):
    for j in range(i+1, n):
        total += lista[i] * lista[j]
total %= d
print(total)


Fixed submission:
d = 10 ** 9 + 7
n = int(input())
lista = [int(x) for x in input().split()]
for k in lista:
    k %= d

totalJ = sum(lista)

total = 0
for i in range(n-1):
    totalJ -= lista[i]
    total += totalJ * lista[i]
total %= d
print(total)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
lista = [int(x) for x in input().split()]

d = 10 ** 9 + 7

total = 0
for i in range(n-1):
    for j in range(i+1, n):
        total += (lista[i] * lista[j]) % d
total %= d
print(total)


Fixed submission:
d = 10 ** 9 + 7
n = int(input())
lista = [int(x) for x in input().split()]
for k in lista:
    k %= d

totalJ = sum(lista)

total = 0
for i in range(n-1):
    totalJ -= lista[i]
    total += totalJ * lista[i]
total %= d
print(total)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
lista = [int(x) for x in input().split()]

total = 0
for i in range(n-1):
    for j in range(i+1, n):
        total += lista[i] * lista[j]
    total %= (10 ** 9 + 7)
print(total)


Fixed submission:
d = 10 ** 9 + 7
n = int(input())
lista = [int(x) for x in input().split()]
for k in lista:
    k %= d

totalJ = sum(lista)

total = 0
for i in range(n-1):
    totalJ -= lista[i]
    total += totalJ * lista[i]
total %= d
print(total)
Buggy python submission (verdict: Runtime Error):
import sys
print = sys.stdout.printline
h,w,a,b = map(int,input().split())
for i in range(h):
    for j in range(w):
        if i<b :
            if j<a :print(0,end="")
            else :print(1,end="")
        else :
            if j<a :print(1,end="")
            else :print(0,end="")
    print("")

Fixed submission:
a = list(map(int, input().split()))
for i in range(a[0]):
    for j in range(a[1]):
        if i<a[3] :
            if j<a[2] :print(0,end="")
            else :print(1,end="")
        else :
            if j<a[2] :print(1,end="")
            else :print(0,end="")
    print("")
Buggy python submission (verdict: Runtime Error):
print("1") if input() == 0; else("0")

Fixed submission:
x = int(input())
if x == 1:
  print("0")
else:print("1")
Buggy python submission (verdict: Runtime Error):
"""
                            pppppppppppppppppppp
                         ppppp  ppppppppppppppppppp
                      ppppppp    ppppppppppppppppppppp
                      pppppppp  pppppppppppppppppppppp
                      pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
       ppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppp
      pppppppppppppppppppppppppppppppppppppppppppppppp  ppppppppppppppppppppp
     ppppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppppp
    ppppppppppppppppppppppppppppppppppppppppppppppp    pppppppppppppppppppppppp
   pppppppppppppppppppppppppppppppppppppppppppppp     pppppppppppppppppppppppppp
  ppppppppppppppppppppppppppppppppppppppppppppp      pppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppppppp               pppppppppppppppppppppppppppppppp
  pppppppppppppppppppppppppppp     pppppppppppppppppppppppppppppppppppppppppppppp
  ppppppppppppppppppppppppppp    pppppppppppppppppppppppppppppppppppppppppppppppp
    pppppppppppppppppppppppp  pppppppppppppppppppppppppppppppppppppppppppppppppp
     ppppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppppp
      pppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppp
       ppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppppp
                              pppppppppppppppppppppppppppppppp
                              pppppppppppppppppppppp  pppppppp
                              ppppppppppppppppppppp    ppppppp
                                 ppppppppppppppppppp  ppppp
                                    pppppppppppppppppppp
"""


import sys
from functools import lru_cache, cmp_to_key
from collections import defaultdict as dd, deque, Counter as C
from bisect import bisect_left as bl, bisect_right as br, bisect
from heapq import heapify, heappop, heappush
# from math import sqrt
from math import ceil, log, floor
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(var, end="\n"): sys.stdout.write(str(var)+end)
def outa(*var, end="\n"): sys.stdout.write(' '.join(map(str, var)) + end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


n, k = sp()
arr = L()
low, high = 1, max(arr)
answer = max(arr)
while low <= high:
    mid = (low + high) >> 1
    req = 0
    for i in range(n):
        if arr[i] <= mid:
            continue
        else:
            temp = arr[i] // mid
            req += temp
    if req <= k:
        answer = min(answer, mid)
        high = mid - 1
    else:
        low = mid + 1
out(answer)


Fixed submission:
n = int(input())
if n >= 30:
  print("Yes")
  exit()
print("No")
Buggy python submission (verdict: Runtime Error):
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# sys.setrecursionlimit(pow(10, 6))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


n, k = sp()
arr = l()
answer = [1]
s = {1}
index = 1
while True:
    temp = arr[answer[-1]-1]
    if temp in s:
        index = temp
        break
    s.add(temp)
    answer.append(temp)
if k <= len(answer)-1:
    out(answer[k-1])
    exit()
# print(answer)
k -= (len(answer)-1)
temp = answer.index(index)
answer = answer[index:]
# print(k)
k %= len(answer)-1
if k == 0:
    k = len(answer)
print(answer[k-1])


Fixed submission:
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# sys.setrecursionlimit(pow(10, 6))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


n, k = sp()
arr = l()
answer = [1]
s = {1}
index = 1
while True:
    temp = arr[answer[-1]-1]
    if temp in s:
        index = temp
        break
    s.add(temp)
    answer.append(temp)
if k <= len(answer)-1:
    out(answer[k])
    exit()
k -= (len(answer)-1)
temp = answer.index(index)
answer = answer[temp:]
k %= len(answer)
if k == 0:
    k = len(answer)
out(answer[k-1])
Buggy python submission (verdict: Runtime Error):
s = input()
if s == "ABC":
  print("ARC")
  exit()
pirnt("ABC")

Fixed submission:
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nlargest, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# sys.setrecursionlimit(pow(10, 6))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(" ".join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


s = data()
if s == "ABC":
    out("ARC")
    exit()
out("ABC")
Buggy python submission (verdict: Runtime Error):
def factor(number):
    i = 2
    s = set()
    while i * i <= number:
        if number % i == 0:
            if i != 2:
                s.add(i)
            if (number // i) != 2:
                s.add(number//i)
        i += 1
    return len(s)


n = int(input())
if n == 3141:
    print(13)
    exit()
if n == 2:
    print(1)
    exit()
if n == 3:
    print(2)
    exit()
answer = 3
answer += factor(n-1)
if sqrt(n) == int(sqrt(n)) and int(sqrt(n)) != 2:
    answer += 1
print(answer)


Fixed submission:
from math import sqrt, log


def factor(number):
    i = 2
    s = set()
    while i * i <= number:
        if number % i == 0:
            if i != 2:
                s.add(i)
            if (number // i) != 2:
                s.add(number//i)
        i += 1
    return s


def newFactor(number):
    n = number
    i = 2
    ans = set()
    while i * i <= number:
        if number % i == 0:
            while number % i == 0:
                number //= i
            if number % i == 1:
                ans.add(i)
        number = n
        i += 1
    return ans


n = int(input())
if n == 2:
    print(1)
    exit()
if n == 3:
    print(2)
    exit()
s = set()
s.add(2)
s.add(n-1)
s.add(n)
s = s.union(factor(n-1))
s = s.union(newFactor(n))
print(len(s))
Buggy python submission (verdict: Runtime Error):

if x == 0:
 print(1)
else:
 print(0)

Fixed submission:
n=int(input())
if(n==1):
  print(0)
else:
  print(1)

Buggy python submission (verdict: Runtime Error):
if x == 0:
 print(1)
else:
 print(0)

Fixed submission:
n=int(input())
if(n==1):
  print(0)
else:
  print(1)
Buggy python submission (verdict: Runtime Error):
D = int(input())
T = int(input())
S = int(input())




time=D/S
if time <= T:
    print("yes")
else:
    print("no")



Fixed submission:
a, b, c = map(int, input().split())
 
if b * c >= a:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
H1, W1 = map(int, input().split())
H2, W2 = map(int, input().split())

H=H1-H2
W=W1-W2

print(HW)

Fixed submission:
H1, W1 = map(int, input().split())
H2, W2 = map(int, input().split())

H=H1-H2
W=W1-W2

print(H*W)
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n % 9 == 0:
  print("Yes")
 else:
  print("No")

Fixed submission:
N=int(input())
if N%9 == 0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input():
    return sys.stdin.readline()[:-1]


def main():
    n = int(input())
    a = list(map(int,input().split()))
    ans = 0
    for i in range(n):
        ans = ans + a[i] * sum(a[i+1:])
    print(ans % (10 ** 9 + 7))

    
if __name__ == "__main__":
    main()

Fixed submission:
import sys
def input():
    return sys.stdin.readline()[:-1]


def main():
    n = int(input())
    a = list(map(int,input().split()))
    s = sum(a)
    ans = 0
    for i in range(n):
        s = s - a[i]
        ans = ans + a[i] * s
    print(ans % (10 ** 9 + 7))

    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())

import itertools
import math
from functools import reduce

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

lis = list(range(1,K+1))
S = [gcd_list(team) for team in itertools.product(lis, repeat = 3)]
print(sum(S))


Fixed submission:
K = int(input())

import itertools
import math
from functools import reduce

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

lis = list(range(1,K+1))
S = [gcd_list(team) for team in itertools.product(lis, repeat = 3)]

print(sum(S))

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

import itertools
import math
from functools import reduce

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

lis = [i for i in range(1,K+1)]
S = [gcd_list(team) for team in itertools.product(lis, repeat = 3)]
print(sum(S))


Fixed submission:
K = int(input())

import itertools
import math
from functools import reduce

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

lis = list(range(1,K+1))
S = [gcd_list(team) for team in itertools.product(lis, repeat = 3)]

print(sum(S))

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

import itertools
import math
from functools import reduce

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

lis = [i for i in range(1,K+1)]
s = 0
for team in itertools.product(lis, repeat = 3):
    s += gcd_list(team)
print(s)




Fixed submission:
K = int(input())

import itertools
import math
from functools import reduce

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

lis = list(range(1,K+1))
S = [gcd_list(team) for team in itertools.product(lis, repeat = 3)]

print(sum(S))
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int,input().split())
while True:
    n =  abs(N - K)
    if n > N:
        print(N)
        break
    N = n


Fixed submission:
N, K = map(int,input().split())
x = N % K
y = (N//K + 1) * K - N 
print(min(x,y))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input():
    return sys.stdin.readline()[:-1]


import collections
def main():
    N = int(input())
    A = list(map(int,input().split()))
    for i in range(N):
        p = A.pop(i)
        c = collections.Counter(A)
        ans = 0
        for j in c.values():
            ans += j * (j - 1) / 2
        A.insert(i, p)
        print(int(ans))
        

if __name__ == "__main__":
    main()

Fixed submission:
import sys
def input():
    return sys.stdin.readline()[:-1]


import collections
def main():
    N = int(input())
    A = list(map(int,input().split()))
    c = collections.Counter(A)
    total = 0
    for j in c.values():
        total += j * (j - 1) / 2
    for i in range(N):
        k = c[A[i]]
        before = k * (k - 1) / 2
        after = (k -1) * (k - 2) / 2
        ans = total - before  + after
        print(int(ans))

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
N = int(input())
X = list(map(int,input().split()))
S = []
for p in range(min(X), max(X)):
    t = [(i - p) ** 2 for i in X]
    S.append(sum(t))
print(min(S))


Fixed submission:
N = int(input())
X = list(map(int,input().split()))
S = []
for p in range(min(X), (max(X) + 1)):
    t = [(i - p) ** 2 for i in X]
    S.append(sum(t))
print(min(S))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
if a = b:
    if a = c:
        print("No")
    else:
        print("Yes")
elif a = c:
    print("Yes") 
else:
    print("No")

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

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

Fixed submission:
a, b, c = map(int,input().split())
if a == b:
    if a == c:
        print("No")
    else:
        print("Yes")
elif a == c:
    print("Yes") 
elif b == c:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
A = [int(x) for x in input().split() 
     if int(x) % 2 == 1 or int(x) % 6 == 0 or int(x) % 10 == 0 ]
if len(A) == N:
    print("APPROVED")
else:
    print("DENIED")

Fixed submission:
N = int(input())
A = [int(x) for x in input().split() 
     if int(x) % 2 == 1 or int(x) % 6 == 0 or int(x) % 10 == 0 ]
if len(A) == N:
    print("APPROVED")
else:
    print("DENIED")

Buggy python submission (verdict: Runtime Error):
n = int(input())
A = [int(x) for x in input().split() 
     if int(x) % 2 == 1 or int(x) % 6 == 0 or int(x) % 10 == 0 ]
if len(A) = N:
    print("APPROVED")
else:
    print("DENIED")

Fixed submission:
N = int(input())
A = [int(x) for x in input().split() 
     if int(x) % 2 == 1 or int(x) % 6 == 0 or int(x) % 10 == 0 ]
if len(A) == N:
    print("APPROVED")
else:
    print("DENIED")

Buggy python submission (verdict: Runtime Error):
n =int(input())
A = [0 if int(x) % 2 == 1 or int(x) % 6 == 0 or int(x) % 10 == 0 
    for x in input().split()]]
if not A:
    print("DENIED")
else:
    print("APPROVED")

Fixed submission:
N = int(input())
A = [int(x) for x in input().split() 
     if int(x) % 2 == 1 or int(x) % 6 == 0 or int(x) % 10 == 0 ]
if len(A) == N:
    print("APPROVED")
else:
    print("DENIED")
Buggy python submission (verdict: Runtime Error):
N, K = map(int,input().split())
P = [(int(x) + 1) / 2 for x in input().split()]
l = []
for i in range(N - K + 1):
    l.append(sum(P[i:(i+K)]))
print('{:.12f}'.format(max(l))) #12桁まで指定


Fixed submission:
S, T= input().split()
A, B= map(int,input().split())
U = input()
if U == S:
    A += -1
else:
    B += -1
print(A, B)
Buggy python submission (verdict: Runtime Error):
H, N= map(int,input().split())
A = [0] * N
B = [0] * N
for i in range(N):
    A[i], B[i] = map(int, input().split())
ma = max(A)
dp = [float("inf")] * (H + ma)
dp[0] = 0
for i in range(N):
    a = A[i]
    b = B[i]
    for j in range(1, H + ma):
        dp[j] = min(dp[j - a] + b, dp[j])
print(min(dp[H:]))


Fixed submission:
H, A = map(int,input().split())
if H % A == 0:
    print(H // A)
else:
    print(H // A + 1)