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

Fixed submission:
def base(n, b):
    d="abcdefghijklmnopqrstuvwxyz"
    s = []
    while True:
        s.append(d[n % b])
        n = n//b -1
        if n < 0:
          break
    return ''.join(reversed(s))
print(base(int(input())-1,26))

Buggy submission (verdict: Runtime Error):
from collections import defaultdict
input()
a = [*map(int, input().split())]
s = sum(a)
b = [[*map(int,input().split())] for _ in range(int(input()))]
c = defaultdict(int)
for i in a:
    c[i]+=1
for i,j in b:
    s += (j-i)*c[i]
    c[j]+=c[i]
    c[i] = 0
    print(s)
Problem p02659 (python)

Fixed submission:
a,b=input().split()
a=int(a)
b=int(b.replace(".",""))
print((a*b)//100)

Buggy submission (verdict: Runtime Error):
s=eval(input().replace(" ", "*").replace(".",""))
print(s//100)
Problem p02688 (python)

Fixed submission:
(n,k),*p = [[*map(int, i.split())] for i in open(0)]
a = sum([p[2*i+1] for i in range(k)],[])
print(n - len(set(a)))

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
a = set()
for i in [0]*k:
    _ = input()
    a.add(*map(int, input().split()))
print(n - len(a))

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
a = set()
for i in [0]*k:
    _ = input()
    a.add(*map(int, input().split()))
    print(a)
print(n - len(a))
Problem p02725 (python)

Fixed submission:
(k,n),(*a,) = [list(map(int,i.split())) for i in open(0)]
a.append(a[0]+k)
print(k - max(a[i+1]-a[i] for i in range(n)))

Buggy submission (verdict: Runtime Error):
(k,n),*a = [list(map(int,i.split())) for i in open(0)]
a.append(a[0]+k)
print(k - min(a[i+1]-a[i] for i in range(n)))

Buggy submission (verdict: Runtime Error):
(k,n),*a = [[*map(int,i.split())] for i in open(0)]
a.append(a[0]+k)
print(k - min(a[i+1]-a[i] for i in range(n)))
Problem p02785 (python)

Fixed submission:
#!/usr/bin/env python3
n, k, *h = map(int, open(0).read().split())
print(sum(sorted(h)[-k-1::-1]))

Buggy submission (verdict: Runtime Error):
print(~-(1<<len(bin(int(input()))[2:])))
Problem p02862 (python)

Fixed submission:
#!/usr/bin/env python3
from functools import reduce

x, y = map(int, input().split())

mod = 10**9 + 7


def cmb(n, r, m):
    def mul(a, b):
        return a * b % m

    r = min(n - r, r)
    if r == 0:
        return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1, r + 1))
    return (over * pow(under, m - 2, m))%m


r = abs(x - y)
l = (min(x, y) - r) // 3
r += l
if l*2+r*1 in (x,y) and l >= 0:
    print(cmb(r + l, l, mod))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
from functools import reduce

x, y = map(int, input().split())

mod = 10**9 + 7


def cmb(n, r, m):
    def mul(a, b):
        return a * b % m

    r = min(n - r, r)
    if r == 0:
        return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1, r + 1))
    return (over * pow(under, m - 2, m))%m


r = abs(x - y)
l = (min(x, y) - r) // 3
r += l
if l*2+r*1 in (x,y):
    print(cmb(r + l, r, mod))
else:
    print(0)
Problem p03723 (python)

Fixed submission:
# my solution
*a, = map(int,input().split())
if any(map(lambda x: bin(x)[-1]== "1", a)):
    print("0")
    exit()
a = [bin(abs(a[i+1]-a[i]))[::-1].find('1') for i in range(2)]
print(max(a) if a[0]*a[1]<0 else min(a))

Buggy submission (verdict: Runtime Error):
*a, = map(int, input().split())
a = [bin(abs(a[i+1]-a[i]))[::-1].find('1') for i in range(2)].sort()
print(a[1] if a[0]*a[1]<0 else a[0])
Problem p03286 (python)

Fixed submission:
n = int(input())
if n == 0:
	 print ("0")
out = []
while n != 0:
	 n, rem = divmod(n, -2)
	 if rem < 0:
	 	 n += 1
	 	 rem -= -2
	 out.append(rem)
print ("".join(map(str, out[::-1])))

Buggy submission (verdict: Runtime Error):
n = int(input())
if n == 0:
	 print ("0")
out = []
while n != 0:
	 n, rem = divmod(n, -2)
	 if rem < 0:
	 	 n += 1
	 	 rem -= ^2
	 out.append(rem)
print ("".join(map(str, out[::-1])))
Problem p02580 (python)

Fixed submission:
ans=0

h,w,m=map(int,input().split())
d=list()
from collections import defaultdict
r=defaultdict(int)
c=defaultdict(int)
r=[0]*(h+1)
c=[0]*(w+1)
for i in range(m):
  a,b=map(int,input().split())
  d+=(a,b),
  r[a]+=1
  c[b]+=1
R=max(r)
C=max(c)

x=0
nr=r.count(R)
nc=c.count(C)
for i in range(m):
    a,b=d[i]
    if r[a]==R and c[b]==C:
        x+=1

ans=R+C
if x==nr*nc:
    ans-=1
print(ans)

Buggy submission (verdict: Runtime Error):
H, W, M = map(int, input().split())
S = [[0]*W for _ in range(H)]
lh = [0]*(H+1)
lw = [0]*(W+1)
l = []
for _ in range(M):
  h, w = map(int, input().split())
  lh[h] += 1
  lw[w] += 1
  l += [[h, w]]

maxh = max(lh)
maxw = max(lw)
cnt = 0

ch = lh.count(maxh)
cw = lw.count(maxw)
for y, x in l:
  if lh[y] == maxh and lw[x] == maxw:
    cnt += 1

ans = maxh+maxw
if cnt == ch*cw:
  ans -= 1

print(ans)

Buggy submission (verdict: Runtime Error):
H, W, M = map(int, input().split())
S = [[0]*W for _ in range(H)]
lh = [0]*H
lw = [0]*W
l = []
for _ in range(M):
  h, w = map(lambda x: int(x)-1, input().split())
  lh[h] += 1
  lw[w] += 1
  l.append((h, w))

maxh = max(lh)
maxw = max(lw)
cnt = 0

ch = lh.count(maxh)
cw = lw.count(maxw)
for y, x in l:
  if lh[y] == maxh and lw[x] == maxw:
    cnt += 1

ans = maxh+maxw
if cnt == ch*cw:
  ans -= 1

print(ans)

Buggy submission (verdict: Runtime Error):
H, W, M = map(int, input().split())
S = [[0]*W for _ in range(H)]
dich = {i: 0 for i in range(H)}
dicw = {i: 0 for i in range(W)}
l = []
for _ in range(M):
  h, w = map(lambda x: int(x)-1, input().split())
  dich[h] += 1
  dicw[w] += 1
  l.append((h, w))

maxh = max(dich.values())
maxw = max(dicw.values())
cnt = 0

ch = sum([1 for i in dich.values() if i == maxh])
cw = sum([1 for i in dicw.values() if i == maxw])
for y, x in l:
  if dich[y] == maxh and dicw[x] == maxw:
    cnt += 1

ans = maxh+maxw
if cnt == ch*cw:
  ans -= 1

print(ans)

Buggy submission (verdict: Runtime Error):
H, W, M = map(int, input().split())
S = [[0]*W for _ in range(H)]
dich = {i: 0 for i in range(H)}
dicw = {i: 0 for i in range(W)}
dic = set()
for _ in range(M):
  h, w = map(lambda x: int(x)-1, input().split())
  dich[h] += 1
  dicw[w] += 1
  dic.add((h, w))

sh = sorted(dich.items(), key=lambda x:-x[1])
sw = sorted(dicw.items(), key=lambda x:-x[1])
maxh = max([i for _, i in sh])
maxw = max([i for _, i in sw])
ans = 0
for h, c1 in sh:
  flg = False
  if c1 < maxh:
    break
  for w, c2 in sw:
    if c2 < maxw:
      flg = True
      break
    if (h, w) in dic:
      ans = max(ans, c1+c2-1)
    else:
      ans = max(ans, c1+c2)
  if flg:
    break

print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
H, W, M = map(int, input().split())
S = [[0]*W for _ in range(H)]
for _ in range(M):
  h, w = map(lambda x: int(x)-1, input().split())
  S[h][w] = 1

S = np.array(S)
T = np.array([[0]*W for _ in range(H)])
for i in range(H):
  T[i] += np.sum(S[i])

for i in range(W):
  T[:, i] += np.sum(S[:, i])

T -= S
print(np.max(T))
Problem p02711 (python)

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

Buggy submission (verdict: Runtime Error):
 = list(input())
if '7' in n:
  print('YES')
else:
  print('NO')
Problem p02793 (python)

Fixed submission:
from fractions import gcd

N = int(input())
A = list(map(int, input().split()))
mod = 10**9+7

x = 1
for i in range(N):
  x = (x*A[i]) // gcd(x, A[i])

ans = 0
for a in A:
  ans += x//a
  #ans %= mod
print(ans%mod)

Buggy submission (verdict: Runtime Error):
import fractions
import functools

def multiple(a, b):
    return a*b // fractions.gcd(a, b)
def lcm(nums):
  return functools.reduce(multiple, nums)
 l[0]

N = int(input())
A = list(map(int, input().split()))
n = lcm(A)
ans = 0
mod = 10**9+7
for a in A:
  ans += n//a
  ans %= mod
print(ans)
Problem p02831 (python)

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

Buggy submission (verdict: Runtime Error):
import math
a, b = map(int, input().split())
#a,bの最小公倍数
def lcm(a, b):
  return a * b // math.gcd (a, b)
print(lcm(a, b))
Problem p02847 (python)

Fixed submission:
dic = {"SUN": 7, "MON": 6, "TUE": 5, "WED": 4, "THU": 3, "FRI": 2, "SAT": 1}
print(dic[input()])

Buggy submission (verdict: Runtime Error):
days = {"SUN":7, "SAT": 1, "FRI":2, "THU":3, "WED":4, "TUR":5, "MON": 6}
s = input()
print(days[s])

Buggy submission (verdict: Runtime Error):
import math
a, b, x = map(int, input().split())
tmp = 0
for i in range(10, 0, -1):
  if a * (10**(i-1)) + b * i <= x:
    tmp = i
    break
if tmp >= 10:
  print(1000000000)
  exit()
if tmp == 0:
  print(0)
  exit()
ans = 0
ans = math.floor((x-b*tmp)/a)
if ans > 10**(tmp):
  ans = 10**(tmp)-1
print(ans)
Problem p02954 (python)

Fixed submission:
S = list(input())
pair = []
cnt = 0
now = S[0]
if len(S) == 2:
  print(1, 1)
  exit()
s, t = 0, 0
for i in range(len(S)-1):
  if now == 'R' and S[i+1] == 'L':
    pair += [[i, i+1]]
    now = 'L'
  if now == 'L' and S[i+1] == 'R':
    pair[-1] += [s, t]
    now = 'R'
    s = t+1
  t += 1


pair[-1] += [s, t]
result = [0]*len(S)
for a, b, s, t in pair:
  p = t - s + 1
  if p % 2 == 0:
    result[a] = p // 2
    result[b] = p // 2
  else:
    a_even = (a-s)//2 + (t-a)//2 + 1
    b_even = p-a_even
    result[a] = a_even
    result[b] = b_even
result = list(map(str, result))
print(" ".join(result))

Buggy submission (verdict: Runtime Error):
S = list(input())
pair = []
cnt = 0
now = S[0]
s, t = 0, 0
for i in range(1, len(S)-1):
  if now == 'R' and S[i+1] == 'L':
    pair += [[i, i+1]]
    now = 'L'
  if now == 'L' and S[i+1] == 'R':
    pair[-1] += [s, t+1]
    now = 'R'
    s = t+2
  t += 1


pair[-1] += [s, t+1]
result = [0]*len(S)
for a, b, s, t in pair:
  p = t - s + 1
  if p % 2 == 0:
    result[a] = p // 2
    result[b] = p // 2
  else:
    a_even = (a-s)//2 + (t-a)//2 + 1
    b_even = p-a_even
    result[a] = a_even
    result[b] = b_even
result = list(map(str, result))
print(" ".join(result))

Buggy submission (verdict: Runtime Error):
S = list(input())
pair = []
cnt = 0
now = S[0]
s, t = 0, 0
for i in range(1, len(S)-1):
  if now == 'R' and S[i+1] == 'L':
    pair += [[i, i+1]]
    now = 'L'
  if now == 'L' and S[i+1] == 'R':
    pair[-1] += [s, t+1]
    now = 'R'
    s = t+2
  t += 1


pair[-1] += [s, t+1]

result = [0]*len(S)
for a, b, s, t in pair:
  p = t - s + 1
  if p % 2 == 0:
    result[a] = p // 2
    result[b] = p // 2
  else:
    if max(a-s, t-b) % 2 == 0:
      result[a] = p // 2 + 1
      result[b] = p // 2
    else:
      result[a] = p // 2 
      result[b] = p // 2 + 1
result = list(map(str, result))
print(" ".join(result))

Buggy submission (verdict: Runtime Error):
S = list(input())
pair = []
cnt = 0
now = S[0]
s, t = 0, 0
for i in range(1, len(S)-1):
  
  if now == 'R' and S[i+1] == 'L':
    pair += [[i, i+1]]
    now = 'L'
  if now == 'L' and S[i+1] == 'R':
    pair[-1] += [t+1-s+1]
    now = 'R'
    s = t+2
  t += 1

pair[-1] += [t+1-s+1]
result = [0]*len(S)
for a, b, p in pair:
  if p % 2 == 0:
    result[a] = p // 2
    result[b] = p // 2
  else:
    result[a] = p // 2 + 1
    result[b] = p // 2
result = list(map(str, result))
print(" ".join(result))
Problem p03013 (python)

Fixed submission:
mod = 1000000007
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
count = [0 for _ in range(n+1)]
count[1] = 1
count[0] = 1
for num in a:
  count[num] = -1

for i in range(1, n+1):
  if count[i] != -1:
    if i == 1:
      count[1] = 1
      continue
    count[i] = (count[i-1] + count[i-2])
    count[i] %= mod
  else:
    count[i] = 0
print(count[-1]%mod)

Buggy submission (verdict: Runtime Error):
mod = 10**9+7
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
count = [0 for _ in range(n+1)]
for num in a:
  count[num] = -1
count[1] = 1
count[2] = 1
for i in range(2, n+1):
  if count[i] != -1:
    count[i] += (count[i-1] + count[i-2])%mod
  else:
    count[i] = 0

print(count[-1])

Buggy submission (verdict: Runtime Error):
mod = 10**9+7
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
count = [0 for _ in range(n+1)]
for num in a:
  count[num] = -1
count[1] = 1
count[2] = 1
for i in range(2, n+1):
  if count[i] != -1:
    count[i] += (count[i-1] + count[i-2])%mod
  else:
    count[i] = 0
print(count)
print(count[-1])
Problem p03038 (python)

Fixed submission:
n, m = map(int, input().split())
a = list(map(int, input().split()))
a = sorted(a)
bc = [list(map(int, input().split())) for _ in range(m)]
bc = sorted(bc, key=lambda x:x[1], reverse=True)
st = 0
flag = True
for i in range(m):
  b, c = bc[i]
  if flag and st < n:
    for i in range(st, min(b+st, n)):
      if a[i] < c:
        a[i] = c
      else:
        flag = False
        break
    st += b
  else:
    break

print(sum(a))

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = list(map(int, input().split()))
a = sorted(a)
bc = [list(map(int, input().split())) for _ in range(m)]
bc = sorted(bc, key=lambda x:x[1], reverse=True)
st = 0
flag = True
for i in range(m):
  b, c = bc[i]
  if flag and st < n:
    for i in range(st, b+st):
      if a[i] < c:
        a[i] = c
      else:
        flag = False
        break
    st += b
  else:
    break

print(sum(a))

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = list(map(int, input().split()))
a = sorted(a)
bc = [list(map(int, input().split())) for _ in range(m)]
bc = sorted(bc, key=lambda x:x[1], reverse=True)
st = 0
flag = True
for i in range(m):
  b, c = bc[i]
  if flag:
    for i in range(st, b+st):
      if a[i] < c:
        a[i] = c
      else:
        flag = False
        break
    st += b
  else:
    break

print(sum(a))
Problem p03242 (python)

Fixed submission:
n = list(input())
result = ''
for num in n:
    if num == '1':
        result += '9'
    elif num == '9':
        result += '1'
print(int(result))

Buggy submission (verdict: Runtime Error):
from collections import Counter

n = int(input())
v = list(map(int, input().split()))
for_set_v = v # set用
set_v = set(v)
even = []
odd = []
count = 0 # 置き換えた回数
count_list = []
for num in range(n):
    if num % 2 == 0:
        even.append(v[num])
    else:
        odd.append(v[num])

even_most = Counter(even).most_common()
odd_most = Counter(odd).most_common()
#print(even_most)
#print(odd_most)
if len(set(v)) >= 2:
    if even_most[0][0] != odd_most[0][0]:
        if len(set(even)) != 1:
            count += (n/2) - int(even_most[0][1])
        if len(set(odd)) != 1:
            count += (n/2) - int(odd_most[0][1])
    else:
        try:
            count_list.append(n-int(even_most[0][1])-int(odd_most[1][1]))
            count_list.append(n-int(even_most[1][1])-int(odd_most[0][1]))
            #print(count_list)
            count += int(min(count_list))
        except:
            if len(even_most) == 1:
                count += (n/2)-int(odd_most[1][1])
            elif len(odd_most) == 1:
                count += (n/2)-int(even_most[1][1])
else:
    count += (n/2)
print(int(count))
Problem p02577 (python)

Fixed submission:
N = int(input())
n = str(N)
a = list(n)

count = 0

for i in range(len(a)):
  count = count + int(a[i])

if count % 9 == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
#N = int(input()).split()
n = 12141.split()
print(n[0])
Problem p02987 (python)

Fixed submission:
S = list(input())
A = sorted(S)
if A[0] == A[1] != A[2] == A[3]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S = list(input())
A = sorted(S)
if A[0] == A[1] ! A[2] == A[3]:
  print("Yes")
else:
  print("No")
Problem p02880 (python)

Fixed submission:
n = int(input())
a = 0
b = 0
for i in range(1, 10):
    b = i
    a = n // i
    if n % i !=0: continue
    elif a <= 9 and b <= 9:
        print('Yes')
        exit()
print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
a, b = 0
for i in range(1, 10):
    b = i
    a = n // i
    if n % i !=0: continue
    elif a <= 9 and b <= 9: 
        print('Yes')
        break
    else :
        print('No')
        break
Problem p02577 (python)

Fixed submission:
n=int(input())
if n%9==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=input()
sm=0
for i in n:
  sm+=int(i)
return sm%9
Problem p03127 (python)

Fixed submission:
from fractions import gcd
print [input(),reduce(gcd,map(int,raw_input().split()))][1]

Buggy submission (verdict: Runtime Error):
import numpy as n;print([input(),n.gcd.reduce(list(map(int,input().split())))][1])

Buggy submission (verdict: Runtime Error):
print [input(),reduce(raw_input().split(),gcd)][1]
Problem p03631 (python)

Fixed submission:
print(["Yes","No"][(lambda x:(abs(x//100-x%10)+99)//100)(input())])

Buggy submission (verdict: Runtime Error):
 print(["Yes","No"][(lambda x:bool(x/100-x%10))(input())])
Problem p02771 (python)

Fixed submission:
a,b,c=input().split()
print("YNeos"[sum((a==b,b==c,c==a))!=1::2])

Buggy submission (verdict: Runtime Error):
a,b,c=input().split()
print("Yes" if sum(a==b,b==c,c==a)==1 else "No")
Problem p02873 (python)

Fixed submission:
S = input()
N = len(S) + 1

vA = [0,] * N
vZ = []
p = ">"
for i,s in enumerate(S):
    if p+s == "><":
        vZ.append(i)
    p = s
if S[-1] == ">":
    vZ.append(N-1)

# print(vZ)##
####
for z in vZ:
    if z == N-1:
        break
    t = z
    while t<N-1 and S[t] == "<":
        vA[t+1] = vA[t] + 1
        t += 1

# print(vA)##

for z in vZ:
    if z == 0:
        continue
    t = z
    while t>0 and S[t-1] == ">":
        vA[t-1] = max(vA[t] + 1, vA[t-1])
        t -= 1

# print(vA)###
print(sum(vA))

Buggy submission (verdict: Runtime Error):
S = input()
N = len(S) + 1

vA = [0,] * N
vZ = []
p = ">"
for i,s in enumerate(S):
    if p+s == "><":
        vZ.append(i)
    p = s
if S[-1] == ">":
    vZ.append(N-1)

# print(vZ)##
####
for z in vZ:
    if z == N-1:
        break
    t = z
    while t<N-1 and S[t] == "<":
        vA[t+1] = vA[t] + 1
        t += 1

# print(vA)##

for z in vZ:
    if z == 0:
        continue
    t = z
    while S[t-1] == ">":
        vA[t-1] = max(vA[t] + 1, vA[t-1])
        t -= 1

# print(vA)###
print(sum(vA))
Problem p03327 (python)

Fixed submission:
import sys
input = sys.stdin.buffer.readline

def gcd(a: int, b: int):
    """ https://cocodrips.hateblo.jp/entry/2014/03/05/143623
    """
    while b:
        a, b = b, a%b
    return a

def lcm(a: int, b: int):
    return a * b // gcd(a, b)


def main():
    N = int(input())
    #N, M = map(int, input().split())
    #print(lcm(N, M))
    print("ABC" if N<1000 else "ABD")


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.buffer.readline

def gcd(a: int, b: int):
    """ https://cocodrips.hateblo.jp/entry/2014/03/05/143623
    """
    while b:
        a, b = b, a%b
    return a

def lcm(a: int, b: int):
    return a * b // gcd(a, b)


def main():
    N = int(input())
	#N, M = map(int, input().split())
    #print(lcm(N, M))
	print("ABC" if N<1000 else "ABD")

if __name__ == "__main__":
    main()
Problem p02659 (python)

Fixed submission:
import sys 
input =sys.stdin.readline 
from decimal import Decimal 

def main():
	a,b= list(map(Decimal,input().strip().split()))
	print(int(a*b))

main()

Buggy submission (verdict: Runtime Error):
import sys 
input =sys.stdin.readline 
from deciaml import Decimal 

def main():
	a,b= list(map(Decimal,input().strip().split()))
	print(int(a*b))

main()
Problem p02754 (python)

Fixed submission:
import math
N, A, B = (int(x) for x in input().split(' '))
tmp = A * math.floor(N/(A+B))

if ( N % (A+B) ) > A:
  print(tmp+A) 
else:
  print(tmp+( N % (A+B)))

Buggy submission (verdict: Runtime Error):
import math
N, A, B = (int(x) for x in input().split(' '))
tmp = A * math.floor(N/(A+B))

if ( N % (A+B) ) > A:
  print(ans+A) 
else:
  print(ans+( N % (A+B)))
Problem p02659 (python)

Fixed submission:
import sys
S, T = map(str, input().split())
 
S1 = int(S)
T1 = T.replace(".", "")


print(S1*int(T1)//100)

Buggy submission (verdict: Runtime Error):
from decimal import *
A,B = map(int, input().split())
A = Decimal(A)
B = Decimal(B)

print(Decimal((A*B)/1))

Buggy submission (verdict: Runtime Error):
import math
decimal.getcontext().prec = 6
S = input().split()
A = int(S[0])
B = float(S[1])


print(int(math.floor(A*B)))

Buggy submission (verdict: Runtime Error):
import math

A,B = map(int, input().split())

print(int(math.floor(A*B)))

Buggy submission (verdict: Runtime Error):
import math

A,B = map(int, input().split())

print(math.floor(A*B))

Buggy submission (verdict: Runtime Error):
import math

A,B = map(int, input().split())

print(math.floor(A*B))
Problem p02725 (python)

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

ans = A[-1]-A[0]
for i in range(N-1):
    ans = min(ans, K-A[i+1]+A[i])
print(ans)

Buggy submission (verdict: Runtime Error):
import itertools
K, N = map(int, input().split())
A = list(map(int, input().split()))

A_list = list(itertools.permutations(l, N))
ans = 10**8
for i in A_list:
    tmp = 0
    
    if i[0] == min(A) and i[2] == max(A):
        pass
    else:
        for j in range(N-1):
            if abs((i[j+1]) - (i[j])) <= abs(K-i[j+1]):
                tmp = tmp +  abs((i[j+1]) - (i[j]))
            else:
                tmp = tmp + abs(K-i[j+1])
        
        if tmp <= ans:
            ans = tmp
print(ans)

Buggy submission (verdict: Runtime Error):
import itertools
K, N = map(int, input().split())
A = list(map(int, input().split()))

A_list = list(itertools.permutations(l, N))

print(A_list)
Problem p02759 (python)

Fixed submission:
N = int(input())
if N % 2 == 0:
    print(int(N/2))
else:
    print(int(N//2)+1)

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

#とりまぶっこむ 
SClis = [] 
for _ in range(M):
    a, b = map(int, input().split())
    SClis.append([a,b])

ans = [-1]*N

for i in range(M):
    singlelis = SClis[i]
    S =  (singlelis[0] - 1)
    C =  (singlelis[1])
    
    if ans[S] != -1 and ans[S] != C:
        print(-1)
        sys.exit()
    else:
        ans[S] = C


    
if N == 1:
    if ans[0] == -1:
        ans[0] = 0
        print(''.join(map(str, ans)))
        sys.exit()

if N != 1:
    if ans[0] == 0:
        print(-1)
        sys.exit()
    
    if ans[0] == -1:
        ans[0] = 1
    
    for i in range(1,N):
        if ans[i] == -1:
            ans[i] = 0

print(''.join(map(str, ans)))
Problem p02777 (python)

Fixed submission:
s,t = input().split()
a,b = map(int,input().split())
u = input()
 
if u == s:
    print(a - 1, b)
else:
    print(a, b- 1)

Buggy submission (verdict: Runtime Error):
import sys
A = list(map(int, input().split()))
N = int(input())

if len(A) == len(set(A)):
    print("YES")
else:
    print("NO")
Problem p02779 (python)

Fixed submission:
import sys
N = int(input())
A = list(map(int, input().split()))
if len(A) == len(set(A)):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
import sys
A = list(map(int, input().split()))
N = int(input())

if len(A) == len(set(A)):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
import sys
A = list(map(int, input().split()))
n = int(input())

if len(A) == len(set(A)):
    print("YES")
else:
    print("NO")
Problem p02835 (python)

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

SUM_A = sum(A)

if SUM_A <= 21:
    print("win") 
else:
    print("bust")

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

SUM_A = sum(A)

if SUM_A <= 21:
    pritn("win") 
else:
    print("bust")
Problem p02836 (python)

Fixed submission:
S = input()

ans = 0

ALEN = (len(S))
 
B = list(S)
 
 
 
B_re =  list(reversed(B))
 
ans = 0
 

 
for i in range(ALEN):
  if B[i] != B_re[i]:
        ans = ans+1
    
if ans % 2 == 0:
    print(ans//2)
elif ans %2 != 0:
    print((ans//2) +1)
elif ans == 0:
    print(0)

Buggy submission (verdict: Runtime Error):
S = "redcoder"

ans = 0

ALEN = (len(A))
 
B = list(A)
 
 
 
B_re =  list(reversed(B))
 
ans = 0
 
 
for i in range(ALEN):
    if B[i] != B_re[i]:
        ans = ans+1
    
if ans　% 2 == 0:
    print(ans//2)
elif ans %2 != 0:
    print((ans//2) +1)
elif ans == 0:
    print(0)