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

Fixed submission:
# import bisect
# # import heapq
# # from copy import deepcopy
from collections import deque
# # from collections import Counter
# # from itertools import accumulate
# # from itertools import permutations
# import numpy as np
# # import math

n, m, k = map(int, input().split())
# a = list(map(int, input().split()))
# n = int(input())

class UnionFind:
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def size(self, x):
        return -self.parents[self.find(x)]

uf = UnionFind(n)
friend =[[] for _ in range(n)]
block = [[] for _ in range(n)]
for i in range(m):
    a,b = map(int, input().split())
    a,b = a-1,b-1
    uf.union(a,b)
    friend[a].append(b); friend[b].append(a)

for i in range(k):
    c,d = map(int, input().split())
    c,d = c-1,d-1
    if uf.same(c,d):
        block[c].append(d); block[d].append(c)

w = [0] * n
for i in range(n):
    w[i] = uf.size(i) - len(friend[i]) - len(block[i]) - 1

print(*w)

Buggy submission (verdict: Runtime Error):
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math

# n, m, k = map(int, input().split())
# a = list(map(int, input().split()))
# n = int(input())

class UnionFind:
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def size(self, x):
        return -self.parents[self.find(x)]

uf = UnionFind(n)
friend =[[] for _ in range(n)]
block = [[] for _ in range(n)]
for i in range(m):
    a,b = map(int, input().split())
    a,b = a-1,b-1
    uf.union(a,b)
    friend[a].append(b); friend[b].append(a)

for i in range(k):
    c,d = map(int, input().split())
    c,d = c-1,d-1
    if uf.same(c,d):
        block[c].append(d); block[d].append(c)

w = [0] * n
for i in range(n):
    w[i] = uf.size(i) - len(friend[i]) - len(block[i]) - 1

print(*w)
Problem p02769 (python)

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

mod = 10**9+7
MOD = 10 ** 9 + 7
MAX = 2*n+1


fact = [1] * (MAX + 1)  # i!
finv = [1] * (MAX + 1)  # (i!)^{-1}
iinv = [1] * (MAX + 1)  # i^{-1}

for i in range(2, MAX + 1):
    fact[i] = fact[i - 1] * i % MOD
    iinv[i] = MOD - iinv[MOD % i] * (MOD // i) % MOD
    finv[i] = finv[i - 1] * iinv[i] % MOD


def c(n, k):
    if n < k or n < 0 or k < 0:
        return 0
    return (fact[n] * finv[k] % MOD) * finv[n - k] % MOD


ans = 0
for m in range(1,min(n-1,k)+1):
    # print((c(n,m) * c(n-1,m)) % mod)
    ans += (c(n,m)%mod * c(n-1,m)%mod) % mod

if k == 1:
    print(ans % mod)

else:
    print((ans+1) % mod)

Buggy submission (verdict: Runtime Error):
mod = 10**9+7
n, k = map(int,input().split())
import numpy as np

def c(n,k):
    return (pow(np.math.factorial(n),1,mod) * pow(np.math.factorial(k), mod-2, mod) * pow(np.math.factorial(n-k), mod-2, mod)) % mod


ans = 0
for m in range(1,min(n-1,k)+1):
    # print((c(n,m) * c(n-1,m)) % mod)
    ans += (c(n,m)%mod * c(n-1,m)%mod) % mod

if k == 1:
    print(ans % mod)

else:
    print((ans+1) % mod)
Problem p02777 (python)

Fixed submission:
# import math
# import bisect
# import heapq
# from collections import deque
# import numpy as np

# a,b,c = map(int, input().split())
# n = int(input())
# a = list(map(int,input().split()))
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 math
# import bisect
# import heapq
# from collections import deque
# import numpy as np

# a,b,c = map(int, input().split())
# n = int(input())
# a = list(map(int,input().split()))
s,t = input().split()
a,b = map(int, input().split())
u = int(input())
if u == s: print(a-1,b)
else: print(a,b-1)

Buggy submission (verdict: Runtime Error):
# import math
# import bisect
# import heapq
# from collections import deque
# import numpy as np

# a,b,c = map(int, input().split())
# n = int(input())
# a = list(map(int,input().split()))
s,t = input().split()
a,b = map(int, input().split())
u = int(input())
if u == s: print(a-1,b)
else: print(a,b-1)
print(ans)
Problem p02833 (python)

Fixed submission:
n = int(input())
ans = 0

if n % 2 == 0:
    n = n // 2
    fives = 5
    while 1:

        if fives > n: 
            break
        ans += n // fives
        fives *= 5

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 0

if n % 2 == 0:
    n = n // 2
    fives = 5
    while 1:

        if fives > n: 
            break
        ans += n // fives
        fives *= 5

print(ans) 
    
    '
Problem p02847 (python)

Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
s = input()
l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
if s == l[0]: print(7)
elif s == l[1]: print(6)
elif s == l[2]: print(5)
elif s == l[3]: print(4)
elif s == l[4]: print(3)
elif s ==l[5]: print(2)
elif s == l[6]: print(1)

Buggy submission (verdict: Runtime Error):
n = int(input())
# s = input()
c = []
hen = [[] for _ in range(n)]
for i in range(n-1):
    a,b = map(int,input().split())
    hen[a-1].append(b-1); hen[b-1].append(a-1)
    c.append([a-1,b-1])

k = 0
for i in range(n):
    k = max(k,len(hen[i]))
print(k)

child = [[] for _ in range(n)]
for [a,b] in c:
    color = 1
    while (color in child[a]) or (color in child[b]):
        color += 1

    child[a].append(color)
    child[b].append(color)
    print(color)
Problem p02879 (python)

Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
# n = int(input())
a,b = map(int,input().split())
ans = -1
if 1<=a<=9 and 1<=b<=9:
    ans = a*b

print(ans)

Buggy submission (verdict: Runtime Error):
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
n = int(input())


if n > 81:
    print('No')
    exit()

else:
    for i in range(2,10):
        if n % i == 0 and 1<= n // i <=9:
            print('Yes')
            exit()

print('No')
Problem p02880 (python)

Fixed submission:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
n = int(input())


if n > 81:
    print('No')
    exit()

else:
    for i in range(1,10):
        if n % i == 0 and 1<= (n // i) <=9:
            print('Yes')
            exit()

print('No')

Buggy submission (verdict: Runtime Error):
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
n = int(input())

def prime(n):
    p = True
    for i in range(2,math.sqrt(n) + 1):
        if n % i == 0 :
            p = False
            break

    return p

print('Yes' if n<=81 and not prime(n) else 'No')
Problem p03108 (python)

Fixed submission:
import math
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}



n, m = map(int, input().split())

a, b = [0] * m, [0] * m

for i in range(m):
    a[i],b[i] = map(int,input().split())

uni = UnionFind(n)

def C(n):
    return n*(n-1)//2

f =[C(n)]
com = C(n)
for i in range(m-1,-1,-1):

    na, nb = a[i]-1,b[i]-1
    if not uni.same(na,nb):
        n1 = uni.size(na)
        n2 = uni.size(nb)
        uni.union(na,nb)

        com -= n1*n2
    # print(n1, n2)

    f.append(com)

f.reverse()
print(*f[1:])

Buggy submission (verdict: Runtime Error):
import math
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}



n, m = map(int, input().split())

a, b = [0] * m, [0] * m
for i in range(m):
    a[i],b[i] = map(int,input().split())

uni = UnionFind(n)
def C(n):
    return n*(n-1)//2

f =[C(n)]
for i in range(m-1,-1,-1):
    com = C(n,2)
    na, nb = a[i]-1,b[i]-1

    uni.union(na, nb)
    members = uni.all_group_members()
    for v,w in members.items():
        if len(w)>1:
            com -= C(len(w))

    f.append(com)

f.reverse()
print(*f[1:])
Problem p03137 (python)

Fixed submission:
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()
d = [x[i] - x[i-1] for i in range(1, m)]
d.sort()
print(sum(d[:m-n]) if m >= n else 0)

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()

dis=[]
if n>m: 
    print(0)
else:
    for i in range(m-1):
        dis[i] = x[i+1] - x[i]

    dis.sort() 

    print(sum(dis[:m-n]))

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()

dis=[]
if n>m: 
    print(0)
else:
    for i in range(len(x)-1):
        dis[i] = x[i+1] - x[i]

    dis.sort()

    print(sum(dis[:m-n]))

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()

dis=[]
res=0
if n>m: 
    print(0)
else:
    for i in range(len(x)-1):
        dis[i] = x[i+1] - x[i]

    dis.sort()

    for j in range(n-1):
        res += dis[j]

    print(sum(dis) - res)

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()

dis=[]
res=0
if n>m: 
    print(0)
else:
    for i in range(len(x)-1):
        dis[i] = x[i+1] - x[i]

    dis.sort()

    for j in range(n-1):
        res += y[j]

    print(sum(dis) - res)

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()

dis=[]
res=0
if n>m: ans=0
else:
    for i in range(len(x)-1):
        dis[i] = x[i+1] - x[i]

    y.sort()

    for j in range(n-1):
        res += y[j]

    return sum(y) - res

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()

dis=[]
ans=0
if n>m: ans=0
else:
    for i in range(len(x)-1):
        dis[i] = x[i+1] - x[i]

    y.reverse()

    for j in range(n-1):
        ans += y[j]

    return ans
Problem p02688 (python)

Fixed submission:
n, k= map(int, input().split())
x = [0]*n
for i in range(k):
  z = int(input())
  if z == 1:
    x[int(input())-1] +=1
  else:
    a = list(map(int, input().split()))
    for j in a:
      x[j-1] +=1
print(x.count(0))

Buggy submission (verdict: Runtime Error):
n, k= map(int, input().split())
x = [0]*n
for i in range(k):
  z = int(input())
  if z == 1:
    x[z-1] +=1
  else:
    a = list(map(int, input().split()))
    for j in a:
      x[j-1] +=1
print(x.count(0))
Problem p02711 (python)

Fixed submission:
a = input()
if a[0]=='7' or a[1] == '7' or a[2] == '7':
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a = input()
if a.count(7)>=1:
  print('Yes')
else:
  print('No')
Problem p02754 (python)

Fixed submission:
N, a, b =map(int, input().split())
count=N//(a+b)
ans= count * a + min(N % (a + b), a)
print(ans)

Buggy submission (verdict: Runtime Error):
N, a, b = map(int, input().split())
x = (N//(a+b)) *a
l='b'*a
l+='r'*b
y = l[0:int(N%(a+b))]
print(x + y.count('b'))
Problem p02773 (python)

Fixed submission:
N = int(input())
S = []
for i in range(N):
    S.append(input())
T = {}
for i in range(N):
  if S[i] in T:
    T[S[i]] += 1
  else:
    T.setdefault(S[i],1)
A = max(T.values())

keys = [k for k, v in T.items() if v == A]
U =sorted(keys)

for i in range(len(U)):
  print(U[i])

Buggy submission (verdict: Runtime Error):
from collections import Counter
 
N = int(input())
S = [input() for x in range(N)]
E = Counter(S)
c = max(E.values())
s = [s for s, g in b.items() if g == c]
s.sort()
print('\n'.join(s))

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

N = int(input())
S = [input() for x in range(N)]
E = Counter(a)
c = max(E.values())
s = [s for s, g in b.items() if g == c]
s.sort()
print('\n'.join(s))
Problem p02933 (python)

Fixed submission:
a = int(input())
s = input()
if a>= 3200:
  print(s)
else:
  print('red')

Buggy submission (verdict: Runtime Error):
a = input()
s = input()
if a>= 3200:
  print(s)
else:
  print('red')
Problem p02970 (python)

Fixed submission:
a, b = map(int, input().split())
if a%(1+2*b) !=0:
  print(a//(1+2*b)+1)
else:
  print(a//(1+2*b))

Buggy submission (verdict: Runtime Error):
a, b = int(input())
if a%(1+b) !=0:
  print(a//(1+b)+1)
else:
  print(a//(1+b))
Problem p03072 (python)

Fixed submission:
a = int(input())
l = list(map(int, input().split()))
c = 1
for i in range(1, a):
  if l[i] >= max(l[:i]):
    c +=1
print(c)

Buggy submission (verdict: Runtime Error):
a = int(input())
l = list(map(int, input().split()))
for i in range(a):
  if l[i] >= max(l[0:i]):
    c +=1
print(c)
Problem p03075 (python)

Fixed submission:
a = [int(input()) for x in range(5)]
k = int(input())
 
if a[4] - a[0] > k:
  print(':(')
else:
  print('Yay!')

Buggy submission (verdict: Runtime Error):
a = [input() for x in range(5)]
k = int(input())

if a[4] - a[0] > k:
  print(':(')
else:
  print('Yay!')
Problem p03207 (python)

Fixed submission:
n = int(input())
p = [0] * n
for i in range(n):
  p[i]= int(input())
p.sort()
print(p[-1]//2 + sum(p[:-1]))

Buggy submission (verdict: Runtime Error):
n = int(input())
p = []
for i in range(n):
  p[i]= int(input())
p.sort()
print(p[-1]//2 + sum(p[:-2]))
Problem p03242 (python)

Fixed submission:
a = input()
b = []
for i in range(3):
  if a[i] =='1':
  	b.append('9')
  else:
    b.append('1')
print(''.join(b))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = []
for i in range(3):
  if a[i] ==1:
  	b.append('9')
  else:
    b.append('1')
print(''.join(b))

Buggy submission (verdict: Runtime Error):
a = int(input())
for i in range(3):
  if a[i] ==1:
  	a[i] ==9
  else:
    a[i] ==1
print(a)
Problem p02897 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
if N%2 == 1:
  print(((N-1)/2)/((N-1)/2-1))
else:
  print(0.5)
Problem p02847 (python)

Fixed submission:
s = input()

cnt = 0

if( s == "SUN" ):
  cnt = 7
elif( s == "MON" ):
  cnt = 6
elif( s == "TUE" ):
  cnt = 5
elif( s == "WED" ):
  cnt = 4
elif( s == "THU" ):
  cnt = 3
elif( s == "FRI" ):
  cnt = 2
elif( s == "SAT" ):
  cnt = 1
  
print(cnt)

Buggy submission (verdict: Runtime Error):
a,b,x = map(int, input().split() )

x_s = str(x)
n = len(x_s)#桁数

cnt = 0

if(a * 1 + b > x):
  cnt = 0
elif( x >= a * 1000000000 + b * 10):
  cnt = 1000000000
else:
  for i in range( int(x//a), -1, -1 ):
    i_s = str(i)
    n = len(i_s)
    #print(a * i + b * n)
    if( a * i + b * n <= x ):
      cnt = i
      break
  

print(cnt)
Problem p02915 (python)

Fixed submission:
n = int(input())

cnt = 1

for i in range(3):
	cnt = cnt * n

print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())

cnt = 1

for i in range(3):
cnt = cnt * n

print(cnt)
Problem p02933 (python)

Fixed submission:
n = int(input())
s = input()

if n >= 3200:
  print(s)
else:
  print("red")

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()

if n >= 3200:
  print(s)
else:
  print(''red")
Problem p02951 (python)

Fixed submission:
a, b, c = map(int, input().split())

cnt = c - a + b

if(cnt < 0):
  cnt = 0

print(cnt)

Buggy submission (verdict: Runtime Error):
a, b, c = input()

cnt = c - a + b

if(cnt < 0):
  cnt = 0
else:
  continue
  
print(cnt)
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')
Problem p02595 (python)

Fixed submission:
import math
n,d = map(int,input().split())
r = 0
d_ = d**2
for i in range(n):
  a,b = map(int,input().split())
  if d_ >= a**2 + b**2:
    r += 1
print(r)

Buggy submission (verdict: Runtime Error):
import math
n,d = map(int,input().split())
r = 0
for in range(n):
  a,b = map(int,input().split())
  if d >= math.sqrt(a**2 + b**2):
  	r += 1
print(r)

Buggy submission (verdict: Runtime Error):
import math
n,d = map(int,input().split())
r = 0
for in range(n):
  a,b = map(int,input().split())
  if d >= math.sqrt(a**2 + b**2):
  	r += 1
print(r)

Buggy submission (verdict: Runtime Error):
import math
n,d = map(int,input().split())
r = 0
for in range(n):
  a,b = map(int,input().split())
  if d >= math.sqrt(a**2 + b**2)
  	r += 1
print(r)

Buggy submission (verdict: Runtime Error):
n,d = map(int,input().split())
r = 0
d_ = d**2
for i in n:
  a,b = map(int,input().split())
  if d_ >= a**2 + b**2:
    r += 1
print(r)

Buggy submission (verdict: Runtime Error):
import math
n,d = map(int,input().split())
r = 0
d_ = d**2
for i in n:
  a,b = map(int,input().split())
  if d_ >= a**2 + b**2:
    r += 1
print(r)

Buggy submission (verdict: Runtime Error):
import math
a = 0
X = int(input())
[N,D] = X.split(' ')
for n in range(N):
  Y = int(input())
  [xn,yn] = Y.split(' ')
  qn = math.sqrt(xn ** 2 + yn ** 2)
  if qn <= D:
    a += 1
print(a)
Problem p02595 (python)

Fixed submission:
N,D=map(int,input().split())
X=0
for i in range(N):
  a,b = map(int,input().split())
  if ((a)**2+(b)**2)**0.5<=D:
    X+=1
print(X)

Buggy submission (verdict: Runtime Error):
import numpy as np
N,D=map(int,input().split())
A=0
for i in range(N):
  X,Y=map(int,input().split())
  d=np.linalg.norm(X-Y)
  if d<=D:
    A+=1
print(A)

Buggy submission (verdict: Runtime Error):
import numpy as np
N,D=map(int,input().split())
A=0
for i in range(N):
  X,Y=map(int,input().split())
  if np.linalg.norm(X-Y) <=D:
    A+=1
print(A)
Problem p02622 (python)

Fixed submission:
A=input()
B=input()
C=0
for i in range(len(A)):
  if A[i] != B[i]:
    C+=1
print(C)

Buggy submission (verdict: Runtime Error):
A=input()
B=input()
C=0
for i in range(N):
  if A[i] != B[i]:
    C+=1
print(C)
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):
a=float(input())
b=float(input())
print(a*b//1)

Buggy submission (verdict: Runtime Error):
print(math.floor(input()*input()))

Buggy submission (verdict: Runtime Error):
A,B=int(input()),float(input())
print(A*B//1)

Buggy submission (verdict: Runtime Error):
A=int(input()) B=float(input())
print(A*B//1)

Buggy submission (verdict: Runtime Error):
A=int(input()) B=float(input())
print(int(A*B//1))
Problem p02676 (python)

Fixed submission:
K=int(input())
S=input()
if K >= len(S):
  print(S)
else:
  print(S[:K]+"...")

Buggy submission (verdict: Runtime Error):
K=int(input())
S=input()
if K >= len(S):
  print(S)
else:
  print(S:[K]+"...")
Problem p02729 (python)

Fixed submission:
N,M=map(int,input().split())
print(N*(N-1)//2+M*(M-1)//2)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
print(N＊(N-1)/2 +M＊(M-1)/2)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
print(N(N-1)/2 +M(M-1)/2)

Buggy submission (verdict: Runtime Error):
N,M=map(int,iuput().split())
print(N(N-1)/2 +M(M-1)/2)
Problem p02759 (python)

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

Buggy submission (verdict: Runtime Error):
N=input()
if N % 2 ==0:
  print(N/2)
else:
  print(N//2+1)
Problem p02777 (python)

Fixed submission:
S,T=input().split()
A,B=map(int,input().split())
U=input()

if S==U:
  print(A-1,B)
else:
  print(A,B-1)

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

flag = False
for i in range(1,N):
  if A[i] == A[i-1]:
    flag = True
    
if flag:
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
N=int(input())
A=sorted(list(map(int,input().split())))
flag = False
for i in range(1,N):
  if A[i] == A[i-1]:
    flag = True
if flag:
  print("NO")
else:
  print("YES")
Problem p02779 (python)

Fixed submission:
N=int(input())
A=sorted(list(map(int,input().split())))
flag = False
for i in range(1,N):
  if A[i] == A[i-1]:
    flag = True
if flag:
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
N=int(input())
A=sorted(list(map(int,input().split())))
flag = False
for i in range(1,N):
  if A[i] == A[i-1]:
    flag = True
if frag:
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
N=int(input())
A=sorted(list(map(int,input().split())))
for i in range(N):
  if A[i] ==A[i+1]:
    print("NO")
  else:
    print("YES")