Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02623 (python)

Fixed submission:
def iteraccumulate(l):
    from itertools import accumulate
    return list(accumulate(l))


def resolve():
    from bisect import bisect_right
    inf = 10 ** 10
    n, m, k = map(int, input().split())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    aa = [0] + iteraccumulate(a) + [inf]
    bb = iteraccumulate(b) + [inf]
    lbb = len(bb)
    ans = 0
    for index, i in enumerate(aa):
        j = bisect_right(bb, k - i)
        if j == 0 and i <= k:
            ans = max(ans, index)
        elif j > 0 and i + bb[j - 1] <= k:
            ans = max(ans, index + j)
    print(ans)


if __name__ == '__main__':
    resolve()

Buggy submission (verdict: Runtime Error):
def iteraccumulate(l):
    from itertools import accumulate
    return list(accumulate(l))


def resolve():
    from bisect import bisect_right
    n, m, k = map(int, input().split())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    aa = [0] + iteraccumulate(a)
    bb = iteraccumulate(b)
    lbb = len(bb)
    ans = 0
    for index, i in enumerate(aa):
        j = bisect_right(bb, k - i)
        if i + bb[j - 2] <= k:
            ans = max(ans, index + j - 1)
        if i + bb[j - 1] <= k:
            ans = max(ans, index + j)
        if j < lbb and i + bb[j] <= k:
            ans = max(ans, index + j + 1)
    print(ans)


if __name__ == '__main__':
    resolve()
Problem p02695 (python)

Fixed submission:
def resolve():
    n, m, q = map(int, input().split())
    queue = []
    for i in range(q):
        queue.append(list(map(int, input().split())))
    ans = 0
    import itertools
    l = itertools.combinations(range(1, n + m), n)
    for i in l:
        a = [x - y for y, x in enumerate(i)]
        x = 0
        for j in queue:
            if a[j[1] - 1] - a[j[0] - 1] == j[2]:
                x += j[3]
        ans = max(ans, x)
    print(ans)


if __name__ == '__main__':
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    n, m, q = map(int, input().split())
    queue = []
    for i in range(q):
        queue.append(list(map(int, input().split())))
    ans = 0
    import itertools
    l = list(itertools.combinations(range(1, n + m), m))
    for i in l:
        a = [x - y for y, x in enumerate(i)]
        x = 0
        for j in queue:
            if a[j[1] - 1] - a[j[0] - 1] == j[2]:
                x += j[3]
        ans = max(ans, x)
    print(ans)


if __name__ == '__main__':
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    n, m, q = map(int, input().split())
    queue = []
    for i in range(q):
        queue.append(list(map(int, input().split())))
    ans = 0
    import itertools
    l = list(itertools.combinations(range(1, n + m), m))
    for i in l:
        a = [x - y for y, x in enumerate(i)]
        x = 0
        for j in queue:
            if a[j[1] - 1] - a[j[0] - 1] == j[2]:
                x += j[3]
        ans = max(ans, x)
    print(ans)


if __name__ == '__main__':
    resolve()
Problem p02753 (python)

Fixed submission:
print("YNeos"[len(set(input()))<2::2])

Buggy submission (verdict: Runtime Error):
print("YNeos"[len(set(input())>1)::2])
Problem p02754 (python)

Fixed submission:
n,a,b=map(int,input().split());c=a+b;print((n//c)*a+min(n%c,a))

Buggy submission (verdict: Runtime Error):
n,a,b=map(int,input().split());a+b=c;print(n//c+n%c)

Buggy submission (verdict: Runtime Error):
n,a,b=map(int,input().split());a+b=c;print(n//c+max(n%c-a,0))
Problem p02793 (python)

Fixed submission:
def PrimeFactorization(m):
    pf = {}
    for i in range(2, int(m ** 0.5) + 1):
        while m % i == 0:
            pf[i] = pf.get(i, 0) + 1
            m //= i
    if m > 1:
        pf[m] = 1
    return pf


def lcmlist(l):
    from collections import defaultdict
    d = defaultdict(int)
    for i in set(l):
        for k, v in PrimeFactorization(i).items():
            if v > d[k]:
                d[k] = v
    n = 1
    for k, v in d.items():
        n *= k ** v
    return n

n=int(input())
a=list(map(int,input().split()))
x=lcmlist(a)
ans=0
for i in a:
  ans+=x//i
ans%=1000000007
print(ans)

Buggy submission (verdict: Runtime Error):
def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    prime = [2]
    limit = int(n ** 0.5)
    data = [i + 1 for i in range(2, n, 2)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]
        
def PrimeFactorization(m, primeList):
    pf = {}
    for i in primeList:
        if m < i:
            break
        while m % i == 0:
            pf[i] = pf.get(i, 0) + 1
            m //= i
    if m > 1:
        pf[m] = 1
    return pf


def lcmlist(l, primeList):
    from collections import defaultdict
    d = defaultdict(int)
    for i in set(l):
        for k, v in PrimeFactorization(i, primeList).items():
            if v > d[k]:
                d[k] = v
    n = 1
    for k, v in d.items():
        n *= k ** v
    return n

n=int(input())
a=list(map(int,input().split()))
l=get_sieve_of_eratosthenes(max(a))
x=lcmlist(a,l)
ans=0
for i in a:
  ans+=x//i
  ans%=1000000007
print(ans)
Problem p02819 (python)

Fixed submission:
def is_prime(n):
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            return False
    return True
n=int(input())
while not is_prime(n):
  n+=1
print(n)

Buggy submission (verdict: Runtime Error):
def miller_rabin(n, k=-1):
    import random
    if n == 2:
        return True
    if n == 1 or n & 1 == 0:
        return False
    if k < 1:
        k = min(n - 1, 100)
    d = (n - 1) >> 1
    while d & 1 == 0:
        d >>= 1
    for a in random.sample(range(n), k):
        t = d
        y = pow(a, t, n)
        while t != n - 1 and y != 1 and y != n - 1:
            y = (y * y) % n
            t <<= 1
        if y != n - 1 and t & 1 == 0:
            return False
    return True
def main():
  x=int(input())
  for i in range(n+1,1000000):
    if miller_rabin(i):
      print(i)
      return
main()

Buggy submission (verdict: Runtime Error):
def get_sieve_of_eratosthenes(n):
    prime = [2]
    limit = int(n ** 0.5)
    data = [i + 1 for i in range(2, n, 2)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]
print(get_sieve_of_eratosthenes(int(input())[-1])
Problem p02820 (python)

Fixed submission:
n,k=map(int, input().split())
r,s,p=map(int, input().split())
t=input()
ans=0
for i in range(k):
  u=t[i::k]
  u=u.replace("rr", "rx")
  u=u.replace("pp", "px")
  u=u.replace("ss", "sx")
  ans+=u.count("s")*r
  ans+=u.count("p")*s
  ans+=u.count("r")*p
print(ans)

Buggy submission (verdict: Runtime Error):
n,k=map(int, input().split())
r,s,p=map(int, input().split())
t=input()
ans=0
for i in range(k):
  u=s[i::k]
  u=u.replace("rr", "rx")
  u=u.replace("pp", "px")
  u=u.replace("ss", "sx")
  ans+=u.count("s")*r
  ans+=u.count("p")*s
  ans+=u.count("r")*p
print(ans)
Problem p02829 (python)

Fixed submission:
print(6-int(input())-int(input()))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split());print(6-a-b)
Problem p03127 (python)

Fixed submission:
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def gcdl(l):
    from functools import reduce
    return reduce(lambda x, y: gcd(x, y), l)
n=input()
print(gcdl(list(map(int,input().split()))))

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def gcdl(l):
    from functools import reduce
    reduce(lambda x, y: gcd(x, y), a)
n=input()
print(gcdl(list(map(int,input().split()))))
Problem p03221 (python)

Fixed submission:
def main():
    n, m = map(int, input().split())
    p = [0] * m
    y = [0] * m
    dic = {}
    cities = [[] for _ in range(n)]
    x = [0] * m
    for i in range(m):
        p[i], y[i] = map(int, input().split())
        cities[p[i] - 1].append(y[i])
        dic[y[i]] = i
    for i in cities:
        for ind, j in enumerate(sorted(i), 1):
            x[dic[j]] = ind
    for i in range(m):
        print("{:06}{:06}".format(p[i],x[i]))


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    n, m = map(int, input().split())
    p = [0] * m
    y = [0] * m
    dic = {}
    cities = [[] for _ in range(n)]
    x = [0] * m
    for i in range(m):
        p[i], y[i] = map(int, input().split())
        cities[p[i] - 1].append(y[i])
        dic[y[i]] = i
    for index, i in enumerate(cities):
        for ind, j in enumerate(sorted(i), 1):
            x[dic[j]] = ind
    for i in range(m):
        print(f"{p[i]:06}{x[i]:06}")


if __name__ == '__main__':
    main()
Problem p03286 (python)

Fixed submission:
def log2(n):
    i = 1
    r = 0
    if n < 0:
        i = 2
        r = 1
        n = -n
    s = i
    while n > s:
        i *= 4
        s += i
        r += 2
    return r


def resolve():
    n = int(input())
    if n == 0:
        print(0)
        return
    ans = [0] * 40
    while n:
        l = log2(n)
        ans[l] += 1
        n = n - (-2) ** l
    while ans[-1] == 0:
        ans.pop()
    print("".join([str(x) for x in ans[::-1]]))


if __name__ == '__main__':
    resolve()

Buggy submission (verdict: Runtime Error):
def log2(n):
    i = 1
    r = 0
    if n < 0:
        i = 2
        r = 1
        n = -n
    s = i
    while n > s:
        i *= 4
        s += i
        r += 2
    return r


def resolve():
    n = int(input())
    if n == 0:
        print(0)
        return
    ans = [0] * 30
    while n:
        l = log2(n)
        ans[l] += 1
        n = n - (-2) ** l
    while ans[-1] == 0:
        ans.pop()
    print("".join([str(x) for x in ans[::-1]]))


if __name__ == '__main__':
    resolve()
Problem p03307 (python)

Fixed submission:
n=int(input());print(n if n%2==0 else n*2)

Buggy submission (verdict: Runtime Error):
n=input();print(n if n%2==0 else n*2)
Problem p03327 (python)

Fixed submission:
print("AABBDC"[int(input())<1000::2])

Buggy submission (verdict: Runtime Error):
print("AABBDC"[int(input())<1000::2]

Buggy submission (verdict: Runtime Error):
print("AABBDC")[int(input())<1000::2]
Problem p03803 (python)

Fixed submission:
a,b=map(int,input().split())
print("Draw"if a==b else"Alice"if a==1 else"Bob"if b==1 else"Alice"if a>b else"Bob")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input()).split()
print("Draw" if a==b else "Alice" if a==1 else "Bob"if b==1 else "Alice" if a>b else "Bob")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input()).split())
print("Draw" if a==b else "Alice" if a==1 else "Bob"if b==1 else "Alice" if a>b else "Bob")
Problem p02627 (python)

Fixed submission:
#1問目
a = input()
if a.isupper() == True:
    print("A")
else:
    print("a")

Buggy submission (verdict: Runtime Error):
#5問目
N = int(input())
a = list(map(int, input().split()))
#XORはpythonでは^で表現
temp = 0
result = []
for i in range(N):
    for j in range(len(a)):
        if j != i:
            temp = temp ^ a[j]
    result.append(temp)
    temp = 0
print(''.join(result))
Problem p02688 (python)

Fixed submission:
#B問題
N, K = map(int, input().split())
Result = [True] * N
Count = 0
for i in range(K):
    d = int(input())
    A = input().split()
    for j in range(len(A)):
        Result[int(A[j])-1] = False

Count = Result.count(True)
print(Count)

Buggy submission (verdict: Runtime Error):
#B問題
N, K = map(int, input().split())
Result = [True] * N
count = 0
for i in range(K):
    d = int(input())
    A = input().split()
    for j in range(len(A_i)):
        Result[A_i[j]-1] = False

count = Result.count(True)
print(count)

Buggy submission (verdict: Runtime Error):
#B問題
N, K = map(int, input().split())
Result = [True] * N
for i in range(K):
    d = int(input())
    A = input().split()
    for j in range(len(A_i)):
        Result[A_i[j]-1] = False

count = Result.count(True)
print(count)
Problem p02572 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
s = 0
ans = 0
for i in range(len(a)):
  s += a[i]
for i in range(len(a)-1):
  s -= a[i]
  if s<0:
	s += 1e9+7
  ans += s*a[i]
  ans %= 1e9+7
print(int(ans))
Problem p02659 (python)

Fixed submission:
from decimal import Decimal as dc
a,b = map(dc, input().split())
print(int(a*b))

Buggy submission (verdict: Runtime Error):
n = int(input())
if n==1:
  print(0)
else:
  cnt = 0
  flg = 0
  for i in range(1000000):
    if n<i:
      break
    if i==0 or i==1 or n%i!=0:
      continue
    j = i
    while(n%j==0):
      if flg==0:
        flg = 1
      n /= j
      j *= i
      cnt += 1
  if flg==0:
    print(1)
  else:
    print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n==1:
  print(0)
else:
  cnt = 0
  flg = 0
  for i in range(1000000):
    if n<i:
      break
    if i==0 or i==1 or n%i!=0:
      continue
    j = i
    while(n%j==0):
      if flg==0:
        flg = 1
      n = int(n/j)
      j *= i
      cnt += 1
  if flg==0:
    print(1)
  else:
    print(cnt)
Problem p02695 (python)

Fixed submission:
N, M, Q = list(map(int, input().split()))
a = [0]*Q
b = [0]*Q
c = [0]*Q
d = [0]*Q
for i in range(Q):
  a[i], b[i], c[i], d[i] = list(map(int, input().split()))
li = [1]*11
ans = 0

def countup(l, n, m):
  l[n] += 1
  if l[n] > m:
    if n == 0:
      return
    countup(l, n-1, m)
    l[n] = l[n-1]
  return

while(li[0]==1):
  pt = 0
  for i in range(Q):
    if (li[b[i]]-li[a[i]]==c[i]):
      pt += d[i]
  ans = max(ans, pt)
  countup(li, N, M)

print(ans)

Buggy submission (verdict: Runtime Error):
N, M, Q = list(map(int, input().split()))
a = [0]*Q
b = [0]*Q
c = [0]*Q
d = [0]*Q
for i in range(Q):
  a[i], b[i], c[i], d[i] = list(map(int, input().split()))
li = [1]*12
ans = 0

def countup(l, n, m):
  l[n] += 1
  if l[n] > m:
    l[n] -= 1
    countup(l, n-1, m)
  return

while(li[0]==1):
  pt = 0
  for i in range(Q):
    if (li[b[i]]-li[a[i]]==c[i]):
      pt += d[i]
  ans = max(ans, pt)
  countup(li, N, M)

print(ans)
Problem p03075 (python)

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

R=[a,b,c,d,e,k]

for i in range(5):
 f=R[i]-R[0]
 g=R[i]-R[1]
 h=R[i]-R[2]
 j=R[i]-R[3]
 if f>k or g>k or h>k or j>k:
  print(":(")
  exit()
print("Yay!")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

R=[a,b,c,d,e,k]

for i in 4:
 d=R[i]-R[0]
 e=R[i]-R[1]
 f=R[i]-R[2]
 g=R[i]-R[3]
 if d>k or e>k or f>k or g>K:
  print(":(")
  exit()
print("Yay!")
Problem p02793 (python)

Fixed submission:
import math

mod=1000000007

count=[0 for i in range(1000005)]

def factorize(x):
	lim= int(math.sqrt(x))
	for i in range(2,lim+1):
		if x%i == 0:
			c=0
			while x%i==0:
				x/=i
				c+=1
			x=int(x)

			if count[i]<c: count[i]=c
	if x>1:	
		if count[x]<1: count[x]=1

def minus(ans,x):
	lim= int(math.sqrt(x))
	for i in range(2,lim+1):
		if x%i == 0:
			c=0
			while x%i==0:
				x/=i
				c+=1
			x=int(x)

			ans*= pow(pow(i,c),mod-2,mod)
			ans%=mod

	ans*= pow(pow(x,1),mod-2,mod)
	ans%=mod

	return int(ans)

n=int(input())
l= list(map(int,input().split()))

ans=0
for x in l:
	factorize(x)

ans=1
for i in range(1,1000005):
	ans*= pow(i,count[i],mod)
	ans%=mod

lc=ans
res=0
for x in l:
	res+=minus(lc,x)
	res%=mod

print(res)

Buggy submission (verdict: Runtime Error):
import math

mod=1000000007

def lcm(x, y):
	return int((x*y)/math.gcd(x,y))

n=int(input())
l= list(map(int,input().split()))

lc= l[0]

for x in l:
	lc=lcm(lc,x)

ans=0
for x in l:
	ans+=int(lc/x)
	ans=ans%mod

print(int(ans))
Problem p02832 (python)

Fixed submission:

N = int(input())
a = list(map(int, input().split(" ")))

t = 1
for x in a:
    if x == t:
        t += 1
t -= 1

if t == 0:
    print(-1)
else:
    print(N-t)

Buggy submission (verdict: Runtime Error):

N = int(input())
a = list(map(int, input().split(" ")))

t = 1
for x in a:
    if x == t:
        t += 1
t -= 1

if t == 0:
    print(-1)
else:
    print(M-t)
Problem p02552 (python)

Fixed submission:
x = int(input())
if x == 0:
    print(1)
elif x == 1:
    print(0)

Buggy submission (verdict: Runtime Error):
n = int(input())
if x == 0:
    print(1)
elif x == 1:
    print(0)
Problem p02549 (python)

Fixed submission:
import sys
import numpy as np
import numba
from numba import njit, b1, i4, i8, f8

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

MOD = 998_244_353


@njit((i8, i8[:]), cache=True)
def main(N, LR):
    L, R = LR[::2], LR[1::2]
    K = len(L)
    F = np.zeros(N + 10, np.int64)
    F[0] = 1
    for n in range(1, N + 10):
        F[n] += F[n - 1]
        for k in range(K):
            l, r = L[k], R[k] + 1
            if n - l >= 0:
                F[n] += F[n - l]
            if n - r >= 0:
                F[n] -= F[n - r]
        F[n] %= MOD
    ans = F[N - 1] - F[N - 2]
    return ans % MOD


N, K = map(int, readline().split())
LR = np.array(read().split(), np.int64)

print(main(N, LR))

Buggy submission (verdict: Runtime Error):
import numpy as np  # noqa
import numba
from numba import njit, b1, i4, i8, f8

m = 998244353
N, K = map(int, input().split())

jumps = []
for i in range(K):
    l, r = map(int, input().split())
    jumps.append(np.array([l, r]))

jumps = np.array(jumps)


@njit((i8, i8, i8[:, :]), cache=True)
def main(N, m, jumps):
    dpsum = np.zeros(N + 1)
    dp = np.zeros(N + 1)
    dp[1] = dpsum[1] = 1

    for i in range(2, N + 1):
        for j, jump in enumerate(jumps):
            mn = max(0, i - jump[1])
            mx = max(mn, i - jump[0])
            dp[i] = (dp[i] + dpsum[mx] - dpsum[mn - 1]) % m
        dpsum[i] = (dp[i] + dpsum[i - 1]) % m
    return dp[N]


print(int(main(N, m, jumps)))

Buggy submission (verdict: Runtime Error):
import numpy as np  # noqa
import numba
from numba import njit, b1, i4, i8, f8

m = 998244353
N, K = map(int, input().split())

jumps = []
for i in range(K):
    l, r = map(int, input().split())
    jumps.append([l, r])

jumps = np.array(jumps)


@njit((i8, i8, i8[:, :]), cache=True)
def main(N, m, jumps):
    dpsum = np.zeros(N + 1)
    dp = np.zeros(N + 1)
    dp[1] = dpsum[1] = 1

    for i in range(2, N + 1):
        for j, jump in enumerate(jumps):
            mn = max(0, i - jump[1])
            mx = max(mn, i - jump[0])
            dp[i] = (dp[i] + dpsum[mx] - dpsum[mn - 1]) % m
        dpsum[i] = (dp[i] + dpsum[i - 1]) % m
    return dp[N]


print(int(main(N, m, jumps)))

Buggy submission (verdict: Runtime Error):
import numpy as np  # noqa
import numba  # noqa
from numba import njit, b1, i4, i8, f8  # noqa

m = 998244353
N, K = map(int, input().split())

jumps = []
for i in range(K):
    l, r = map(int, input().split())
    jumps.append([l, r])

jumps = np.array(jumps)


@njit((i8, i8, i8[:, :]), cache=True)
def main(N, m, jumps):
    dp = np.zeros(N + 1)
    dp[1] = 1
    for i in range(2, N + 1):
        for j in jumps:
            mn = max(0, i - j[1])
            mx = max(mn, i - j[0])
            dp[i] = (dp[i] + np.sum(dp[mn:mx + 1])) % m
    return dp[N]


print(int(main(N, m, jumps)))
Problem p02623 (python)

Fixed submission:
N, M, K = map(int, input().split())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]

total = 0
Asum = sum(A)
nA = len(A)
Bsum = 0
ans = 0
for nB in range(len(B) + 1):
    if nB != 0:
        Bsum += B[nB-1]
    if Bsum > K:
        break
    while Asum + Bsum > K:
        nA -= 1
        Asum -= A[nA]
    ans = max(nA + nB, ans)

print(ans)

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

total = 0
Asum = sum(A)
nA = len(A)
Bsum = 0
ans = 0
for nB in range(len(B) + 1):
    if nB != 0:
        Bsum += B[nB-1]
    while Asum + Bsum > K:
        nA -= 1
        Asum -= A[nA]
    ans = max(nA + nB, ans)

print(ans)
Problem p02688 (python)

Fixed submission:
N, K = list(map(int, input().split()))
a_set = set()
for k in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    a_set |= set(A)
 
people = a_set
 
print(N - len(people))

Buggy submission (verdict: Runtime Error):
N, K = list(map(int, input().split()))
a_set = set()
for k in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    a_set |= set(A)
  
print(N - len(people))
Problem p02659 (python)

Fixed submission:
A, B = input().split()
A = int(A)
B = float(B)
B = round(B*100)
print(A*B//100)

Buggy submission (verdict: Runtime Error):
A, B = input().split()
A = int(A)
B = float(B)
B = int(B*100)
print(a*b//100)
Problem p02659 (python)

Fixed submission:
# -*- coding: utf-8 -*-
from decimal import Decimal


if __name__ == "__main__":
    
    INPUT = list(map(str, input().split()))

    h1 = int(INPUT[0])
    m1 = int(Decimal(INPUT[1]) * 100)

    print( h1 * m1 // 100 )

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
import math


if __name__ == "__main__":
    
    INPUT = list(map(float, input().split()))


    print(math.floor(h1 * m1))
Problem p02661 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# 整数の入力
import math
import numpy as np

N = int(input())
A = []
B = []
for i in range(N):
    t = list(map(int, input().split()))
    A.append(t[0])
    B.append(t[1])
A.sort()
B.sort()

if N % 2 == 0:
    i = N // 2
    j = N // 2 - 1
    a = A[j] + A[i]
    b = B[j] + B[i]
    print(b - a + 1)
else:
    i = N // 2
    a = B[i] - A[i] + 1

    print(a)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
import math
import numpy as np

if __name__ == "__main__":
    N = int(input())
    A = []
    B = []
    for i in range(N):
        t = list(map(int, input().split()))
        A.append(t[0])
        B.append(t[1])
    A.sort()
    B.sort()

    a = 0
    if N % 2 == 0:
        i = N // 2
        j = N // 2 - 1
        a = AB[j][0] + AB[i][0]
        b = AB[j][1] + AB[i][1]
        print(b - a + 1)
    else:
        i = N // 2
        a = AB[i][1] - AB[i][0] + 1

        print(a)
Problem p02594 (python)

Fixed submission:
X = int(input())
if X >= 30:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
X = int(input())
if X => 30:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
X = int(input())
if X => 30:
    print("YES")
else:
    print("No")
Problem p02831 (python)

Fixed submission:
import fractions
A,B = map(int, input().split())
print(int(A*B//fractions.gcd(A,B)))

Buggy submission (verdict: Runtime Error):
import math
A,B = map(int, input().split())
print(int(A*B//math.gcd(A,B)))

Buggy submission (verdict: Runtime Error):
import math
A,B = map(int, input().split())
print(A*B//math.gcd(A,B))
Problem p02832 (python)

Fixed submission:
N = int(input())
An = list(map(int, input().split()))
done = 0
for i in An:
    if done+1 == i:
        done = i
if done == 0:
    print(-1)
else:
    print(N-done)

Buggy submission (verdict: Runtime Error):
N = int(input())
An = list(map(int, input().split()))
done = 0
for i in An:
    if done+1 == i:
        done = i
    print(done,An,i)

if done == 0:
    print(-1)
else:
    print(N-done)
Problem p02682 (python)

Fixed submission:
A, B, C, K = map(int, input().split(" "))
if K <= A:
    print(K)
else:
    K = K - A
    if K <= B:
        print(A)
    else:
        K = K - B
        print(A - K)

Buggy submission (verdict: Runtime Error):
A, B, C, K = map(int, input.split(" "))
if K <= A:
    print(K)
else:
    K = K - A
    if K <= B:
        print(A)
    else:
        K = K - B
        print(A - K)