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

Fixed submission:
#129C
n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
s = [1] + [0 for i in range(1,n+1)]
p = 1000000007
if n==1:
    print(1)
else:
    ind = 0
    if ind < m:
        if a[0] != 1:
            s[1] = 1
        else:
            ind += 1
    else:
        s[1] = 1
    for i in range(2,n+1):
        if ind < m:
            if a[ind] != i:
                s[i] = (s[i-1] + s[i-2]) % p
            else:
                ind += 1
        else:
            s[i] = (s[i-1] + s[i-2]) % p
    print(s[-1])

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
s = [1] + [0 for i in range(1,n+1)]
p = 1000000007
if n==1:
    print(1)
else:
    ind = 0
    if a[0] != 1:
        s[1] = 1
    else:
        ind += 1
    for i in range(2,n+1):
        if ind < m:
            if a[ind] != i:
                s[i] = (s[i-1] + s[i-2]) % p
            else:
                ind += 1
        else:
            s[i] = (s[i-1] + s[i-2]) % p
    print(s[-1])
Problem p02912 (python)

Fixed submission:
import heapq
N, M = map(int, input().split())
A_list = list(map(lambda x: int(x)*(-1), input().split()))
heapq.heapify(A_list)
for i in range(M):
    max_num = heapq.heappop(A_list) * (-1)
    heapq.heappush(A_list, (-1) * (max_num // 2))
print((-1) * sum(A_list))

Buggy submission (verdict: Runtime Error):
import numpy as np
N, M = map(int, input().split())
A_list = sorted(list(map(int, input().split())))
A_ar = np.array(A_list)[::-1]
for i in range(M):
    A_ar[0] = A_ar[0]//2
    if A_ar[0] < A_ar[1]:
        A_ar = np.sort(A_ar)[::-1]
print(sum(A_ar))
Problem p03208 (python)

Fixed submission:
N, K = map(int, input().split())
h = sorted([int(input()) for i in range(N)])
res = []
for i in range(N-K+1):
    res.append(h[i+K-1] - h[i])
print(min(res))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
h = sorted([int(input()) for i in range(N)])
res = []
for i in range(N-K+1):
    res.append(tmp[i+K-1] - tmp[i])
print(min(res))
Problem p03286 (python)

Fixed submission:
N = int(input())
s = ''

while N != 0:
#    print(N, s, N % (-2) == 0)
    if N % (-2) == 0:
        s = '0' + s
    else:
        s = '1' + s
        N -= 1
    N /= (-2)

if s =='':
    s = '0'
print(s)

Buggy submission (verdict: Runtime Error):
import numpy as np
N, M = map(int, input().split())
A = [int(i) for i in input().split()]
ar = np.eye(N) * A

for h in range(0, N):
    for w in range(1, h+1):
        ar[-h-1, -h-1+w] = ar[-h, -h-1+w] + ar[-h-1, -h-2+w] - ar[-h, -h-2+w]
print(int(sum(sum(ar % M == 0)) - sum(np.linspace(1, N-1, N-1))))
Problem p03291 (python)

Fixed submission:
def main():
    S = input()
    mod = 10**9+7
    dp0 = 1
    dp1 = 0
    dp2 = 0
    dp3 = 0

    for s in S:
        tmp0 = dp0
        tmp1 = dp1
        tmp2 = dp2
        tmp3 = dp3

        if s == '?':
            tmp0 += 2*dp0 % mod
            tmp1 += (2*dp1 + dp0) % mod
            tmp2 += (2*dp2 + dp1) % mod
            tmp3 += (2*dp3 + dp2) % mod
        elif s == 'A':
            tmp1 += dp0 % mod
        elif s == 'B':
            tmp2 += dp1 % mod
        elif s == 'C':
            tmp3 += dp2 % mod
        dp0 = tmp0
        dp1 = tmp1
        dp2 = tmp2
        dp3 = tmp3

    print(dp3%(mod))
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
s = input()
dp = [[1, 0, 0, 0]]
for s in S:
    tmp = [0, 0, 0, 0]
    if s == 'A' or s == '?':
        tmp[0] += dp[-1][0]
        tmp[1] += dp[-1][1]
        tmp[2] += dp[-1][2]
        tmp[3] += dp[-1][3]
        tmp[1] += dp[-1][0]
    if s == 'B' or s == '?':
        tmp[0] += dp[-1][0]
        tmp[1] += dp[-1][1]
        tmp[2] += dp[-1][2]
        tmp[3] += dp[-1][3]
        tmp[2] += dp[-1][1]
    if s == 'C' or s == '?':
        tmp[0] += dp[-1][0]
        tmp[1] += dp[-1][1]
        tmp[2] += dp[-1][2]
        tmp[3] += dp[-1][3]
        tmp[3] += dp[-1][2]
    dp.append(tmp)
print(dp[-1][-1]%(10**9+7))
Problem p03104 (python)

Fixed submission:
a,b=map(int,input().split())
r=0
if a%2==1:
    r=a
    a+=1
if a<=b:
    x,y=divmod(b-a+1,2)
    r^=x%2^b*y
print(r)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input())
def f(i):
    x = a>>i
    y = b>>i
    r = 0
    if x==y:
        if x&1:
            r^=(y-x+1)%2
        return r
    if x&1:
        r^=(a-x+1)%2
    if y&1:
        r^=(b-y)%2
    return r
print(int(''.join([str(f(i)) for i in range(len(bin(b))-2)])[::-1],2))

Buggy submission (verdict: Runtime Error):
a, b = map(int, input())
def f(i):
    x = a>>i
    y = b>>i
    r = 0
    if x==y:
        if x&1:
            r^=(y-x+1)%2
        return r
    if x&1:
        r^=(a-x+1)%2
    if y&1:
        r^=(b-y)%2
    return r
print(int(''.join([str(f(i)) for i in range(len(bin(b))-2)])[::-1],2))
Problem p03137 (python)

Fixed submission:
n, m = map(int, input().split())
x = sorted(map(int, input().split()))
d = sorted(abs(x[i]-x[i+1]) for i in range(m-1))
print(sum(d[:max(0, m-n)]))

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
x = sorted(map(int, input().split())) + [10**6]
y = sorted(((i,j) for i in range(m) for j in (i-1,i+1)),
        key=lambda t: abs(x[t[0]]-x[t[1]]))[::-1]
r = 0
v = set()
for _ in range(m-n):
    while True:
        i, j = y.pop()
        if j not in v:
            break
    v |= {i,j}
    r += abs(x[i]-x[j])
print(r)
Problem p03222 (python)

Fixed submission:
m = 10**9+7
h, w, k = map(int, input().split())
a = [0]*(w-1) + [1]
for i in range(w-1):
    a[i] = a[i-1] + a[i-2]
dp = [0]*w
tmp = [0]*w
dp[0] = 1
for _ in range(1, h+1):
    for i in range(w):
        tmp[i] = dp[i]*a[i-1]*a[w-i-2]
        if i != w-1:
            tmp[i] += dp[i+1]*a[i-1]*a[w-i-3]
        if i != 0:
            tmp[i] += dp[i-1]*a[i-2]*a[w-i-2]
        tmp[i] %= m
    dp, tmp = tmp, dp
print(dp[k-1])

Buggy submission (verdict: Runtime Error):
h, w, k = map(int, input().split())
a = [0]*(w-1) + [1]
for i in range(w-1):
    a[i] = a[i-1] + a[i-2]
dp = [0]*(w+1)
tmp = [0]*(w+1)
dp[0] = 1
for _ in range(1, h+1):
    for i in range(w):
        tmp[i] = (dp[i]*a[i-1]*a[w-i-2]
            + dp[i+1]*a[i-1]*a[w-i-3]
            + dp[i-1]*a[i-2]*a[w-i-2]) % (10**9+7)
    dp, tmp = tmp, dp
print(dp[k-1])

Buggy submission (verdict: Runtime Error):
h, w, k = map(int, input().split())
a = [0]*(w-1) + [1]
for i in range(w-1):
    a[i] = a[i-1] + a[i-2]
dp = [0]*(w+1)
tmp = [0]*(w+1)
dp[0] = 1
for _ in range(1, h+1):
    for i in range(w):
        tmp[i] = (dp[i]*a[i-1]*a[w-i-2]
            + dp[i+1]*a[i-1]*a[w-i-3]
            + dp[i-1]*a[i-2]*a[w-i-2]) % (10**9+7)
        tmp[i] %= m
    dp, tmp = tmp, dp
print(dp[k-1])
Problem p03631 (python)

Fixed submission:
a,_,b=input()
if a==b:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,_b=input()
if a==b:
  print("YES")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,_b=input()
if a==b:
  print("YES")
else:
  print("No")
Problem p03634 (python)

Fixed submission:
import sys
sys.setrecursionlimit(1000000)
n=int(input())
g=[[] for _ in range(n)]
for _ in range(n-1):
    a,b,c=map(int,input().split())
    g[a-1].append((b-1,c))
    g[b-1].append((a-1,c))
q,k=map(int,input().split())
d=[-1]*n
def f(k,c):
    d[k]=c
    for i,v in g[k]:
        if d[i]==-1:
            f(i,c+v)
f(k-1,0)
for _ in range(q):
    x,y=map(int,input().split())
    print(d[x-1]+d[y-1])

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(100000)
n=int(input())
g=[[] for _ in range(n)]
for _ in range(n-1):
    a,b,c=map(int,input().split())
    g[a-1].append((b-1,c))
    g[b-1].append((a-1,c))
q,k=map(int,input().split())
d=[-1]*n
def f(k,c):
    d[k]=c
    for i,v in g[k]:
        if d[i]==-1:
            f(i,c+v)
f(k-1,0)
for _ in range(q):
    x,y=map(int,input().split())
    print(d[x-1]+d[y-1])

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecusionlimit(100000)
n=int(input())
g=[[] for _ in range(n)]
for _ in range(n-1):
    a,b,c=map(int,input().split())
    g[a-1].append((b-1,c))
    g[b-1].append((a-1,c))
q,k=map(int,input().split())
d=[-1]*n
def f(k,c):
    d[k]=c
    for i,v in g[k]:
        if d[i]==-1:
            f(i,c+v)
f(k-1,0)
for _ in range(q):
    x,y=map(int,input().split())
    print(d[x-1]+d[y-1])

Buggy submission (verdict: Runtime Error):
n=int(input())
g=[[] for _ in range(n)]
for _ in range(n-1):
    a,b,c=map(int,input().split())
    g[a-1].append((b-1,c))
    g[b-1].append((a-1,c))
q,k=map(int,input().split())
d=[-1]*n
def f(k,c):
    d[k]=c
    for i,v in g[k]:
        if d[i]==-1:
            f(i,c+v)
f(k-1,0)
print(d)
for _ in range(q):
    x,y=map(int,input().split())
    print(d[x-1]+d[y-1])
Problem p02933 (python)

Fixed submission:
#!/usr/bin/env python
# coding: utf-8

# In[ ]:


a = int(input())
s = input()


# In[ ]:


if a >= 3200:
    print(s)
else:
    print('red')

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

# In[ ]:


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


# In[ ]:


ans = int(C-(A-B))
if ans < 0:
    print(0)
else:
    print(ans)
Problem p03011 (python)

Fixed submission:
#!/usr/bin/env python
# coding: utf-8

# In[2]:


P, Q, R = map(int, input().split())


# In[3]:


t = [P, Q, R]
print(sum(t)-max(t))


# In[ ]:

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

# In[64]:


import numpy as np
H, W = map(int, input().split())
S = np.array([list(input()) for i in range(H)])
"""
4 6
#..#..
.....#
....#.
#.#...
"""


# In[72]:


field = np.ones((H, W))
field[S=='#'] = 0
lm, rm, um, dm = (field.copy() for _ in [0]*4)
#print(field)


# In[73]:


#np.where()
for i in range(1, H):
    um[i] = (um[i-1]+1) * field[i]
    dm[-1-i] = (dm[-i]+1) * field[i]
    
for i in range(1, W):
    lm[:, i] = (lm[:, i-1]+1) * field[:, i]
    rm[:, -1-i] = (rm[:, -i]+1) * field[:, i]


# In[75]:


#print(um)
#print(dm)
#print(lm)
#print(rm)
print(int(np.max(um+dm+lm+rm)-3))


# In[ ]:

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

# In[27]:


import numpy as np
H, W = map(int, input().split())
S = np.array([list(input()) for i in range(H)])
"""
4 6
#..#..
.....#
....#.
#.#...
"""


# In[51]:


row_beam = np.zeros((H, W))
col_beam = np.zeros((H, W))
sh, sw = np.where(S=='#')


# In[52]:


#np.where()
for i in range(H):
    #print(i)
    #print(row_beam)
    row = S[i]
    #sharp_pos = np.where(row=='#')[0]
    sharp_pos = sw[sh==i]
    #print(sharp_pos)
    if len(sharp_pos) == 0:
        row_beam[i] = W
    else:
        s = 0
        for sp in sharp_pos:
            contin = sp-s
            row_beam[i, s:sp] = contin
            s = sp+1
        if s != W:
            row_beam[i, s:W] = W-s
            
for i in range(W):
    #print(i)
    #print(col_beam)
    col = S[:,i]
    #sharp_pos = np.where(col=='#')[0]
    sharp_pos = sh[sw==i]
    #print(sharp_pos)
    if len(sharp_pos) == 0:
        col_beam[:, i] = H
    else:
        s = 0
        for sp in sharp_pos:
            contin = sp-s
            col_beam[s:sp, i] = contin
            s = sp+1
        if s != W:
            col_beam[s:H, i] = H-s


# In[53]:


print(int(np.max(row_beam+col_beam-1)))


# In[54]:


#print(row_beam)
#print(col_beam)


# In[ ]:
Problem p03013 (python)

Fixed submission:
#!/usr/bin/env python
# coding: utf-8

# In[31]:


N, M = map(int, input().split())
As = [int(input()) for i in range(M)]
"""
100 5
1
23
45
67
89
"""


# In[32]:


import numpy as np
import sys


# In[33]:


As = np.array(As)
oAs = As[1:]-As[:-1]
if 1 in oAs:
    print(0)
    sys.exit()


# In[34]:


stairs = [0]*(N+3)
stairs[0] = 1
#stairs[1] = 1

start_stage = 0
for i in range(M):
    collapsed_stage = As[i]
    finish_stage = collapsed_stage - 1
    #print(start_stage, finish_stage)
    continuous_stairs = finish_stage - start_stage
    if continuous_stairs < 2:
        stairs[finish_stage+2] = stairs[start_stage]
        start_stage = finish_stage+2
    else:
        stairs[start_stage+1] = stairs[start_stage]
        for i in range(continuous_stairs-1):
            stairs[start_stage+i+2] = stairs[start_stage+i] + stairs[start_stage+i+1]
        stairs[finish_stage+2] = stairs[finish_stage]
        start_stage = finish_stage+2

if N-start_stage < 2:
    stairs[N] = stairs[start_stage]
else:
    continuous_stairs = N - start_stage
    stairs[start_stage+1] = stairs[start_stage]
    for i in range(continuous_stairs-1):
        stairs[start_stage+i+2] = stairs[start_stage+i] + stairs[start_stage+i+1]
        #print(stairs)
        
#print(list(range(N+1)))
#print(stairs)
print(stairs[N]%1000000007)


# In[ ]:

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

# In[31]:


N, M = map(int, input().split())
As = [int(input()) for i in range(M)]
"""
100 5
1
23
45
67
89
"""


# In[32]:


import numpy as np


# In[33]:


As = np.array(As)
oAs = As[1:]-As[:-1]
if 1 in oAs:
    print(0)
    sys.exit()


# In[34]:


stairs = [0]*(N+3)
stairs[0] = 1
#stairs[1] = 1

start_stage = 0
for i in range(M):
    collapsed_stage = As[i]
    finish_stage = collapsed_stage - 1
    #print(start_stage, finish_stage)
    continuous_stairs = finish_stage - start_stage
    if continuous_stairs < 2:
        stairs[finish_stage+2] = stairs[start_stage]
        start_stage = finish_stage+2
    else:
        stairs[start_stage+1] = stairs[start_stage]
        for i in range(continuous_stairs-1):
            stairs[start_stage+i+2] = stairs[start_stage+i] + stairs[start_stage+i+1]
        stairs[finish_stage+2] = stairs[finish_stage]
        start_stage = finish_stage+2

if N-start_stage < 2:
    stairs[N] = stairs[start_stage]
else:
    continuous_stairs = N - start_stage
    stairs[start_stage+1] = stairs[start_stage]
    for i in range(continuous_stairs-1):
        stairs[start_stage+i+2] = stairs[start_stage+i] + stairs[start_stage+i+1]
        #print(stairs)
        
#print(list(range(N+1)))
#print(stairs)
print(stairs[N]%1000000007)


# In[ ]:
Problem p02790 (python)

Fixed submission:
(a , b) = list (map (int, input().strip().split()))
c = str(a)*b
d = str(b)*a
if(c < d):
  print (c)
else:
  print(d)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = str(a)*b
d = str(b)*a
if(c < d):
  print (c)
else:
  print(d)
Problem p02984 (python)

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

all_ = sum(a)

x1 = all_ - 2 * (sum([a[i] for i in range(1, n, 2)]))
x = [x1]

for i in range(1, n):
  x_i = 2 * a[i-1] - x[i-1]
  x.append(x_i)

print(' '.join(list(map(str, x))))

Buggy submission (verdict: Runtime Error):
import numpy as np
import scipy.linalg as linalg

n = int(input())
b = [[int(i)] for i in input().split()]

diag = [.5 for i in range(n)]

A = np.diag(diag)
for i in range(n-1):
  A[i][i+1] = .5

A[n-1][0] = .5

invA = np.linalg.pinv(A)
x = np.dot(invA, b)

tmp = [str(int(round(i[0], 0))) for i in x]
print(' '.join(tmp))

Buggy submission (verdict: Runtime Error):
import numpy as np
import scipy.linalg as linalg

n = int(input())
b = [[int(i)] for i in input().split()]

diag = [.5 for i in range(n)]

A = np.diag(diag)
for i in range(n-1):
  A[i][i+1] = .5

A[n-1][0] = .5

LU = linalg.lu_factor(A)
x = linalg.lu_solve(LU, b)

tmp = [str(int(round(i[0], 0))) for i in x]
print(' '.join(tmp))

Buggy submission (verdict: Runtime Error):
import numpy as np

n = int(input())
b = [[int(i)] for i in input().split()]

diag = [.5 for i in range(n)]

A = np.diag(diag)
for i in range(n-1):
  A[i][i+1] = .5

A[n-1][0] = .5

x = np.linalg.solve(A, b)
tmp = [str(int(round(i[0], 0))) for i in x]
print(' '.join(tmp))

Buggy submission (verdict: Runtime Error):
import numpy as np

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

diag = [.5 for i in range(n)]

A = np.diag(diag)
for i in range(n-1):
  A[i][i+1] = .5

A[n-1][0] = .5

b = []
for i in range(n):
  b.append([a_list[i]])

x = np.linalg.solve(A, b)
tmp = [str(int(i[0])) for i in x]
print(' '.join(tmp))
Problem p03075 (python)

Fixed submission:
a=[]
for i in range(5):
    a.append(int(input()))
k = int(input())
for i in range(5):
    for j in range(i+1,5):
        if abs(a[i]-a[j]) > k:
            print(":(")
            exit()
print("Yay!")

Buggy submission (verdict: Runtime Error):
def lsum(x):
    return A[x[0]] + B[x[1]] + C[x[2]]

def nextlist():
    global lx
    idx = 0
    m = lsum(lx[0])
    for i in range(len(lx)):
        s = lsum(lx[i])
        if m < s:
            m = s
            idx = i
    p = lx.pop(idx)
    wa.append(lsum(p))
    if p[0] > 0:
        if not [p[0]-1, p[1], p[2]] in lx:
            lx.append([p[0]-1, p[1], p[2]])
    if p[1] > 0:
        if not [p[0], p[1]-1, p[2]] in lx:
            lx.append([p[0], p[1]-1, p[2]])
    if p[2] > 0:
        if not [p[0], p[1], p[2]-1] in lx:
            lx.append([p[0], p[1], p[2]-1])

l1 = list(map(int, input().split(" ")))

X,Y,Z,K = l1[0],l1[1],l1[2],l1[3]
A = sorted(list(map(int, input().split(" "))))
B = sorted(list(map(int, input().split(" "))))
C = sorted(list(map(int, input().split(" "))))

wa = []
lx = [[X-1,Y-1,Z-1]]

for i in range(K):
    nextlist()

for l in wa:
    print(l)
Problem p02711 (python)

Fixed submission:
import sys
n=input()
for i in n:
	if i=='7':
		print('Yes')
		sys.exit()
print('No')

Buggy submission (verdict: Runtime Error):
import sys
n=input()
for i in n:
	if i=='7':
		print('Yes')
        sys.exit()
print('No')
Problem p02859 (python)

Fixed submission:
r=int(input())
print(int(r**2))

Buggy submission (verdict: Runtime Error):
r=map(int,input())
print(r*r)
Problem p02676 (python)

Fixed submission:
K = int(input())
S = str(input())

if len(S) <= K:
    print(S)
else:
    print(S[:K] + "...")

Buggy submission (verdict: Runtime Error):
K = int(input())
S = str(input())

if len(S) <= K:
    print(S)
else:

    print(S[:K+1]+...)
Problem p02879 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
list = [1,2,3,4,5,6,7,8,9,10,12,14,16,18,15,21,24,27,20,28,32,36,25,35,40,45,30,42,48,54,49,56,63,64,72,81]
for N in list:
  print("Yes")
else:
  print("No")
Problem p02753 (python)

Fixed submission:
data = input()
if (data.count("A") == 3) or (data.count("B") == 3):
    ans = "No"
else:
    ans = "Yes"
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
data = input()
data = data.split(" ")
ans = 0
dataset = np.zeros(int(data[0]), dtype=np.int)
cont = int(data[1])
if int(data[1]) == 0:
    ans = 0

else:
    for i in range(int(data[0])):
        dataset[i] = 1
    for i in range(int(data[0])):
        if i == cont:
            dataset[cont:int(data[2]) + cont] = 2
            cont = i + int(data[2]) + int(data[1])

print(int(np.count_nonzero(dataset == 1)))

Buggy submission (verdict: Runtime Error):
import numpy as np
data = input()
data = data.split(" ")
ans = 0
dataset = np.zeros(int(data[0]), dtype=np.int)
cont = int(data[1])
if int(data[1]) == 0:
    ans = 0

else:
    for i in range(int(data[0])):
        dataset[i] = 1
    print(cont, data)
    for i in range(int(data[0])):
        #print(i)
        if i == cont:
            print("px")
            dataset[cont:int(data[2]) + cont] = 2
            cont = i + int(data[2]) + int(data[1])

#print(dataset, data[1], int(np.count_nonzero(dataset == 1)))
print(int(np.count_nonzero(dataset == 1)))
Problem p02659 (python)

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

Buggy submission (verdict: Runtime Error):
import math
a,b = map(float, input().split())
print(math.floor((a*(b*100)/100))

Buggy submission (verdict: Runtime Error):
import math
a,b = map(float, input().split())
print(math.floor(((a*(b*100))/100))

Buggy submission (verdict: Runtime Error):
import math
a,b = input().split()
b = int(b*100)
print((a*b)//100)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
print(int(a*b))
Problem p02729 (python)

Fixed submission:
import math
N,M = map(int, input().split())
a = 0
b = 0
if N != 1 and N != 0:
    a = math.factorial(N)/(2*math.factorial(N-2))
if M != 1 and M != 0:
    b = math.factorial(M)/(2*math.factorial(M-2))
print(int(a+b))

Buggy submission (verdict: Runtime Error):
import math
N,M = map(int, input().split())
a = 0
b = 0
if N != 1:
    a = math.factorial(N)/(2*math.factorial(N-2))
if M != 1:
    b = math.factorial(M)/(2*math.factorial(M-2))
print(int(a+b))
Problem p02723 (python)

Fixed submission:
s=input()
if s[3-1]==s[4-1] and s[5-1]==s[6-1]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
print(n//500 * 1000 + (n%500)//5 * 5)
Problem p03011 (python)

Fixed submission:
p,q,r=[int(x) for x in input().split(' ')]
print(min(p+q,q+r,p+r))

Buggy submission (verdict: Runtime Error):
n=int(input())
arr=[int(x) for x in input().split(' ')]
total=sum(arr)
temp=0
ans=1000
for item in arr:
  temp+=item
  a=total-temp
  ans=min(ans,abs(a-temp))
print(ans)
Problem p02693 (python)

Fixed submission:
k = int(input().strip())
num = list(map(int, input().split()))
count = k
while 1:
    if num[0] <= k <= num[1]:
        print('OK')
        break
    elif num[1] < k:
        print('NG')
        break
    else:
        k += count

Buggy submission (verdict: Runtime Error):
k = int(input().split())
num = list(map(int, input().split()))
a = int(num[0] / k)
b = int(num[1] / k)
if a == b:
    print('NG')
else:
    print('OK')
Problem p02779 (python)

Fixed submission:
n = int(input())
abc = list(map(int, input().split()))
ans = 'YES'
abc = sorted(abc)
for i in range(n-1):
  if abc[i] == abc[i+1]:
  	ans ='NO'

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
abc = list(map(int, input().split()))
ans = 'YES'
abc = sorted(abc)
for i in range(n):
  if abc[i] = abc[i+1]
  ans ='NO'

print(ans)
Problem p02723 (python)

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

Buggy submission (verdict: Runtime Error):
s = input()
if s[2] == s[3] and s[4] == s[5]:
  print("Yes")
elif
  print("No")

Buggy submission (verdict: Runtime Error):
s = input()
if s[3] == s[4] and s[5] == s[6]:
  print("Yes")
elif
  print("No
Problem p02689 (python)

Fixed submission:
n,m = list(map(int,input().strip().split()))
h = list(map(int,input().split()))
temp = [1] * n
ans = int(0)
for i in range(m):
    a,b = list(map(int,input().strip().split()))
    if h[a-1] > h[b-1]:
        temp[b-1] *= 0
    elif h[a-1] == h[b-1]:
        temp[a-1] *= 0
        temp[b-1] *= 0
    else:
        temp[a-1] *= 0
ans += temp.count(1)
print(ans)

Buggy submission (verdict: Runtime Error):
n,m = list(map(int,input().strip().split()))
h = list(map(int,input().split()))
temp = [1] * n
ans = int(0)
for i in range(m):
    a,b = list(map(int,input().strip().split()))
    if h[a-1] > h[b-1]:
        temp[b-1] *= 0
    elif h[a-1] == h[b-i]:
        temp[a-1] *= 0
        temp[b-1] *= 0
    else:
        temp[a-1] *= 0
ans += temp.count(1)
print(ans)

Buggy submission (verdict: Runtime Error):
n,m = list(map(int,input().strip().split()))
h = list(map(int,input().split()))
temp = [1] * n
for i in range(m):
    a,b = list(map(int,input().strip().split()))
    if h[a-1] > h[b-1]:
        temp[b-1] *= 0
    elif h[a-1] == h[b-i]:
        temp[a-1] *= 0
        temp[b-1] *= 0
    else:
        temp[a-1] *= 0
ans = temp.count(1)
print(ans)
Problem p02785 (python)

Fixed submission:
n, k = map(int, input().split())
h = list(map(int, input().split()))
h = sorted(h, reverse=True)
ans = 0
for i in range(k, n):
  ans+=h[i]
  
print(ans)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(map(input().split()))
h.sort()
ans = int(0)
for i in range(len(h) - k):
    ans += int(h[i])
print(ans)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(map(input().split())
h.sort()
ans = int(0)
if k >= n:
    print(ans)
else:
    for i in range(n - k):
        ans += int(h[i])
    print(ans)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(input().split())
h.sort()
ans = int(0)
if k>=n:
  print(ans)
else:
	for i in range(n - k):
    	ans += int(h[i])
	print(ans)