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

Fixed submission:
n,m = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
dis = []
ans = 0
if n>m:
  print(0)
  exit()
for i in range(m-1):
    dis.append(x[i+1]-x[i])
    ans += x[i+1]-x[i]
dis.sort(reverse = True)
for j in range(n-1):
    ans -= dis[j]
print(ans)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
dis = []
ans = 0
for i in range(m-1):
    dis.append(x[i+1]-x[i])
    ans += x[i+1]-x[i]
dis.sort(reverse = True)
for j in range(n-1):
    ans -= dis[j]
print(ans)
Problem p03221 (python)

Fixed submission:
n,m = map(int,input().split())
py = []
for i in range(m):
    num = i+1
    p,y = map(int,input().split())
    py.append([num,p,y])
py = sorted(py, key = lambda x:x[1]*10**10+x[2])
x = 0
b = '000000'
ans = []
for pyi in py:
    if pyi[1] != x:
        x = pyi[1]
        cnt = 1
    else:
        cnt += 1
    ans.append([pyi[0], (b+str(pyi[1]))[-6:], (b+str(cnt))[-6:]])
ans = sorted(ans, key = lambda x: x[0])
for ansi in ans:
    print(ansi[1]+ansi[2])

Buggy submission (verdict: Runtime Error):
from collections import defaultdict
n,m = map(int,input().split())
city = [list(map(int,input().split())) for _ in range(m)]
d = defaultdict(list)
for k,v in city:
    d[k].append(v)
lis = [[] for _ in range(10**5+1)]
for i in d.keys():
    d[i].sort()
for i in d.keys():
    for j in range(len(d[i])):
        lis[d[i][j]].append(i)
        lis[d[i][j]].append(j+1)
for i in range(m):
    upper,lower = lis[city[i][1]][0], lis[city[i][1]][1]
    uplen,lolen = len(str(upper)),len(str(lower))
    if uplen<6:
        upper = '0'*(6-uplen)+str(upper)
    else:
        upper = str(upper)
    if lolen<6:
        lower = '0'*(6-lolen) + str(lower)
    else:
        lower = str(lower)
    print(upper+lower)
Problem p02547 (python)

Fixed submission:
import sys
import math
import itertools
import collections
from collections import deque
from collections import defaultdict

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():
    N = NI()
    AB = [NLI() for _ in range(N)]
    
    for n in range(N-2):
        if AB[n][0] == AB[n][1]:
            if AB[n+1][0] == AB[n+1][1]:
                if AB[n+2][0] == AB[n+2][1]:
                    print("Yes")
                    sys.exit()
    print("No")





if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math
import itertools
import collections
from collections import deque
from collections import defaultdict

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():
    N = NI()
    AB = [NLI() for _ in range(N)]
    
    for n in range(N):
        if AB[n][0] == AB[n][1]:
            if AB[n+1][0] == AB[n+1][1]:
                if AB[n+2][0] == AB[n+2][1]:
                    print("Yes")
                    sys.exit()
    print("No")





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

Fixed submission:
D, T , S  =map(int,input().split())

if T*S >= D:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import sys
import math
import itertools
import collections
from collections import deque
from collections import defaultdict

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
MOD2 = 998244353
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: 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 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()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())
    
def main():
    
    N, M = NMI()
    
    uf = UnionFind(N)
    
    for m in range(M):
        A,B = NMI()
        uf.union(A-1, B-1)

    ans = 0
    for n in range(N):
        ans = max(ans,uf.size(n))
    print(ans)



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

Fixed submission:
K = int(input())
remainder = 0
ans = -1
 
if K % 2 == 0 or K % 5 == 0:
    ans = -1
else:
    for n in range(1,10**6):
      remainder = (remainder*10 + 7) % K
      if remainder == 0:
          ans = n
          break
      if n == 10**6-1:
          ans = -1
print(ans)

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


def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if num % i == 0:
                divisor_list.append(i)
        divisor_list.append(num)

        return divisor_list



    
if K % 2 == 0 or K % 5 == 0:
    ans = -1
else:
    for x in make_divisor_list(K-1):
        if int("7"*x) % K == 0:
            ans = x

            break
print(ans)
Problem p02624 (python)

Fixed submission:
import sys
import math
import itertools
import collections
from collections import deque

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():
    N = NI()
    ans = 0
    for n in range(1,N+1):
        ans += (N//n)*(2*n+(N//n-1)*n)//2
    print(ans)


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sympy

N = int(input())
ans = 0
for n in range(1,N+1):
    ans += n * len(sympy.divisors(n))
print(ans)

Buggy submission (verdict: Runtime Error):
import sympy

N = int(input())
ans = 0
for n in range(1,N+1):
    ans += n * len(sympy.divisors(n))
    print(n,len(sympy.divisors(n)))
print(ans)
Problem p02682 (python)

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

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

ls = [1] * A + [0] * B + [-1] * C

print(sum(ls[:K]))
Problem p02711 (python)

Fixed submission:
N = input()
 
flag =0
if N[0] == "7":
  flag = 1
if N[1] == "7":
  flag = 1
if N[2] == "7":
  flag = 1
  
if flag == 1:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()

flag =0
if N[0] == "7":
  flag = 1
if N[1] == "7":
  flag = 1
if N[2] == "7":
  flag = 1
  
if flag = 1:
  print("Yes")
else:
  print("No")
Problem p02729 (python)

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

print(C1 + C2)

Buggy submission (verdict: Runtime Error):
s = input().split()
from scipy.special import comb
C1 = comb(s[0], 2, exact=True)
C2 = comb(s[1], 2, exact=True)

print(C1 + C2)
Problem p02771 (python)

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

if A == B:
  if B!=C:
    print("Yes")
  else:
    print("No")
elif (A == C)or (B ==C):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import collections
N = int(input())
 
dic = {}
for i in range(N):
  S = input()
  if S in dic:
    dic[S] += 1
  else:
    dic[S] = 1
maxval = max(dic.values())
 
keys = [k for k, v in dic.items() if  v == max(dic.values())]
[print(sorted(keys)[i]) for i in range(len(keys))]
Problem p02773 (python)

Fixed submission:
import collections
N = int(input())
S = [input() for _ in range(N)]

if len(S) == len(set(S)):
  ans = S
else:
  ans = []
  c = collections.Counter(S)
  c_common = c.most_common()
  max_vote = c_common[0][1]
  for k in range(len(set(S))):
    if c_common[k][1]== max_vote:
      ans.append(c_common[k][0])
    else:
      break
[print(a) for a in sorted(ans)]

Buggy submission (verdict: Runtime Error):
import collections
N = int(input())
S = [input() for _ in range(N)]

if len(S) == len(set(S)):
  ans = S
else:
  ans = []
  c = collections.Counter(S)
  c_common = c.most_common()
  max_vote = c_common[0][1]
  for k in range(len(S)):
    if c_common[k][1]== max_vote:
      ans.append(c_common[k][0])
    else:
      break
[print(a) for a in sorted(ans)]
Problem p02891 (python)

Fixed submission:
S = input()
K = int(input())
 
INNER = 0
  
if len(set(list(S))) == 1:
  print(K*len(S)//2)
else: 
  i = 0
  while i < len(S)-1:
    if S[i] == S[i+1]:
      INNER += 1
      i += 1
    i += 1
  
  if (S[0] != S[-1]):#最初の文字と最後の文字が違うなら、
    print(INNER*K)
  else:
    same_from_start = 0
    same_from_end = 0
    
    count_from_start = 0
    count_from_end = 0
    
    flag_same_from_start = 0
    flag_same_from_end = 0
    
    while flag_same_from_start == 0:
      if S[count_from_start] == S[count_from_start+1]:
        count_from_start += 1
      else:
        count_from_start += 1
        flag_same_from_start = 1
    
    while flag_same_from_end == 0:
      if S[len(S)-count_from_end-1] == S[len(S)-count_from_end-2]:
        count_from_end += 1
      else:
        count_from_end += 1
        flag_same_from_end = 1
    print(INNER*K + (K -1) * ((count_from_start+count_from_end)//2 -\
                              count_from_start//2- count_from_end//2))

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

inner_difference = 0
  
if len(set(list(S))) == 1:
  print(K*len(S)//2)
else:
  i = 0
  while i < len(S)-1:
    if S[i] == S[i+1]:
      inner_difference += 1
      i += 1
    i += 1

  if (S[0] != S[-1])or(S[0]==S[1])or(S[N-1]==S[N-2]):
    print(inner_difference*K)
  else:
    print(inner_difference*K + K-1)
Problem p02951 (python)

Fixed submission:
A, B ,C = map(int,input().split())
 
if (A-B)>=C:
  print(0)
else:
  print(C-(A-B))

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

if (A-B)>=C:
  print(C)
else:
  print(A-B)
Problem p03017 (python)

Fixed submission:
N, A, B,C,D = map(int,input().split())
S = list(input())

a = A-1
b = B-1
c = C-1
d = D-1

ans = 1

for i_a in range(a,C):
  #2連続の##がa~Cにないことを確認
  if S[i_a] == "#":
    if S[i_a+1] == "#":
      ans =0

for i_b in range(b,D):
  #2連続の##がb~Dにないことを確認
  if S[i_b] == "#":
    if S[i_b+1] == "#":
      ans =0

if D < C:
  ans = 0
  for i in range(b,D):
    #3連続があるなら1
    if S[i-1] == ".":
      if S[i] == ".":
        if S[i+1] == ".":
          ans = 1

if ans ==1:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N, A, B,C,D = map(int,input().split())
S = list(input())

a = A-1
b = B-1
c = C-1
d = D-1

ans = 1

for i_a in range(a,C):
  #2連続の##がa~Cにないことを確認
  if S[i_a] == "#":
    if S[i_a+1] == "#":
      ans =0

for i_b in range(b,D):
  #2連続の##がb~Dにないことを確認
  if S[i_b] == "#":
    if S[i_b+1] == "#":
      ans =0

if D < C:
  ans = 0
  for i in range(b-1,D+1):
    #3連続があるなら1
    if S[i] == ".":
      if S[i+1] == ".":
        if S[i+2] == ".":
          ans = 1

if ans ==1:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N, A, B,C,D = map(int,input().split())
S = list(input())

a = A-1
b = B-1
c = C-1
d = D-1

ans = 1

for i_a in range(a,C):
  #2連続の##がa~Cにないことを確認
  if S[i_a] == "#":
    if S[i_a+1] == "#":
      ans =0

for i_b in range(b,D):
  #2連続の##がb~Dにないことを確認
  if S[i_b] == "#":
    if S[i_b+1] == "#":
      ans =0

if D < C:
  ans = 0
  for i in range(b-1,D+1):
    #3連続があるなら1
    if S[i] == ".":
      if S[i+1] == ".":
        if S[i+2] == ".":
          ans = 1

if ans =1:
  print("Yes")
else:
  print("No")
Problem p02659 (python)

Fixed submission:
from math import floor

a, b = [i for i in input().split()]
B = int(b[0] + b[2] + b[3])
print(int(a) * B // 100);

Buggy submission (verdict: Runtime Error):
from math import floor

a, b = [i for i in input().split()]
B = int(b[0] + b[1] + b[2])
print(int(a) * B // 10);
Problem p02578 (python)

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

current_highest = heights[0]
steps_sum = 0
for h in heights[1:]:
  if h > current_highest:
    current_highest = h
  else:
    steps_sum += current_highest - h
 
print(steps_sum)

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

current_highest = heights[0]
steps_sum = 0
for h in heights[1:]:
  if h > current_highest:
    current_highest = h
  else:
    steps_sum += h - current_highest

print(steps_sum)
Problem p02766 (python)

Fixed submission:
import math

num, base = input().split(' ')
print(int(math.log(int(num), int(base)) + 1))

Buggy submission (verdict: Runtime Error):
num, base = input()
print(int(log(int(num), int(base)) + 1)
Problem p03073 (python)

Fixed submission:
s = str(input())
c1 = 0
c2 = 0
x = 1
def hen(n):
  if n == 1:
    return 0
  else:
    return 1
for i in range(len(s)):
  si = int(s[i])
  if si == x:
    c1 += 1
  else:
    c2 += 1
  x = hen(x)
print(min(c1,c2))

Buggy submission (verdict: Runtime Error):
s = str(input())
c1 = 0
c2 = 0
x = 1
def hen(n):
  if n == 1:
    return 0
  else:
    return 1
for i in range(len(s)):
  si = int(s[i])
  if si == x:
    c1 += 1
  else:
    c2 + = 1
  x = hen(x)
print(min(c1,c2))
Problem p02597 (python)

Fixed submission:
N = int(input())
C = input()
 
R_cnt = C.count('R')
x = C[:R_cnt].count('R')
 
print(R_cnt-x)

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

R_cnt = C.count('R')
x = C[:R_cnt].count('R')

print(R_cnt-x)
Problem p02622 (python)

Fixed submission:
S = input()
T = input()

cnt = 0
for s, t in zip(S, T):
  if s != t:
    cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
S, T = map(int, input().split())

cnt = 0
for s, t in zip(S, T):
  if s != t:
    cnt += 1

print(cnt)
Problem p02623 (python)

Fixed submission:
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
 
a = [0]
b = [0]
for i in range(N):
  a.append(a[i]+A[i])
for i in range(M):
  b.append(b[i]+B[i])

ans, j = 0, M
for i in range(N+1):
  if a[i] > K:
    break
  while b[j] > K - a[i]:
    j -= 1
  ans = max(ans, i+j)
print(ans)

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

a = [0]
b = [0]
for i in range(N):
  a.appned(a[i]+A[i])
for i in range(M):
  b.append(b[i]+B[i])

ans, j = 0, M
for i in range(len(A)):
  if a[i] > K:
    break
  while B[j] > K - a[i]:
    j -= 1
  ans = max(ans, i+j)
print(ans)

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

pa, pb = 0, 0

ans = 0
while 1:
  if A[pa] < B[pb]:
    if K - A[pa] >= 0:
      ans += 1
      pa += 1
    else:
      break
  else:
    if K - B[pb] >= 0:
      ans += 1
      pb += 1
    else:
      break
Problem p02659 (python)

Fixed submission:
import math
import decimal
a, b = input().split()
a = decimal.Decimal(a)
b = decimal.Decimal(b)
print(math.floor(a * b))

Buggy submission (verdict: Runtime Error):
import math
from decimal import Decimal
a, b = input().split()
//a = decimal.Decimal(a)
//b = decimal.Decimal(b)
print(math.floor(Decimal(a) * Decimal(b)))

Buggy submission (verdict: Runtime Error):
def main():
  l = input().split()
  A, B = int(l[0]), int(l[1])
  print(int((A*(B*100))/100))

main()

Buggy submission (verdict: Runtime Error):
def main():
  l = input().split()
  A, B = int(l[0]), int(l[1])
  print(int(A*(B*100)/100))

main()
Problem p02688 (python)

Fixed submission:
N, K = map(int, input().split())
sweet = [0 for i in range(N)]
for i in range(K):
  s = input()
  for j in map(int, input().split()):
    sweet[j-1] = 1
cnt = 0
for k in sweet:
  if k == 0:
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
sweet = [0 for i in range(N)]
for i in range(K):
  input()
  for j in map(int, input().split()):
    sweet[j] = 1
cnt = 0
for k in sweet:
  if k == 0:
    cnt += 1
print(cnt)
Problem p02693 (python)

Fixed submission:
import sys
K = int(input())
A, B = map(int, input().split())

for i in range(A, B+1):
  if i % K == 0:
    print('OK')
    sys.exit()
print('NG')

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

for i in range(A, B):
  if i % K == 0:
    print('OK')
    sys.exit()
print('NG')
Problem p02695 (python)

Fixed submission:
N, M, Q = map(int, input().split())
reqs = [list(map(int, input().split())) for _ in range(Q)]

As = []

def make(A):
  global As, N, M
  # print(A)
  if len(A) == N+1:
    As.append(A)
  else:
    for i in range(A[len(A)-1], M+1):
      make(A+[i])

make([1])

maxs = 0
for A in As:
  score = 0
  for req in reqs:
    if A[req[1]] - A[req[0]] == req[2]:
      score += req[3]
  maxs = max(score, maxs)

print(maxs)

Buggy submission (verdict: Runtime Error):
N, M, Q = map(int, input().split())
reqs = [list(map(int, input().split())) for _ in range(Q)]

As = []

def make(A):
  global As, N, M
  if len(A) == N+1:
    As.append(A)
  elif:
    for i in range(A[len(A)-1], M+1):
      A.append(i)

make([1])

max = 0
for A in As:
  score = 0
  for req in reqs:
    if A[req[1]] - A[req[0]] == req[2]:
      score += req[3]
  max = max(score, max)

print(max)
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):
import math
 
N, M = map(int, input().split())

ans1 = 0
if N > 1:
  ans1 = math.factorial(N)/math.factorial(N-2)/2
ans2 = 0
if N > 1:
  ans2 = math.factorial(M)/math.factorial(M-2)/2
print(int(ans1 + ans2))

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

ans1 = 0
if N != 0:
  ans1 = math.factorial(N)/math.factorial(N-2)/2
ans2 = 0
if N != 0:
  ans2 = math.factorial(M)/math.factorial(M-2)/2
print(int(ans1 + ans2))

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

ans1 = math.factorial(N)/math.factorial(N-2)/2
ans2 = math.factorial(M)/math.factorial(M-2)/2
print(int(ans1 + ans2))

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

ans1 = math.factorial(N)/math.factorial(N-2)/2
ans2 = math.factorial(M)/math.factorial(M-2)/2
print(int(ans1 + ans2))

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

ans1 = math.factorial(N)//math.factorial(N-2)//2
ans2 = math.factorial(M)//math.factorial(M-2)//2
print(ans1 + ans2)

Buggy submission (verdict: Runtime Error):
import math

N, M = map(int, input().split())

print(math.factrial(N)//2 + math.factrial(M)//2)
Problem p02766 (python)

Fixed submission:
N, K = map(int, input().split())
 
ans = 1
while 1:
  if N >= K ** ans:
    ans += 1
    continue
  else:
    print(ans)
    break

Buggy submission (verdict: Runtime Error):
N, K = map(int, input())

ans = 1
while 1:
  if N >= K ** ans:
    ans += 1
    continue
  else:
    print(ans)
Problem p02832 (python)

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

k = 1
ans = 0

if 1 not in A:
  print(-1)
  exit()

for a in A:
  if a == k:
    k += 1
  else:
    ans += 1

print(ans)

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

idx = 0
ans = 0
while 1:
  if idx >= len(A):
    exit()
  elif A[idx] == idx+1:
    idx += 1
  else:
    A.pop(idx)
    ans += 1

if len(A) == 0:
  print(-1)
else:
  print(ans)
Problem p02881 (python)

Fixed submission:
import math
 
N = int(input())
 
for i in reversed(range(int(math.sqrt(N))+1)):
  if N % i == 0:
    print(i-1+(N//i)-1)
    break

Buggy submission (verdict: Runtime Error):
import math

N = int(input())

for i in reverse(range(int(math.sqrt(N))+1)):
  if N % i == 0:
    print(i-1+(N//i)-1)
    break
Problem p02659 (python)

Fixed submission:
from math import floor as f
a = input().split()
a[0] = int(a[0])
a[1] = int("".join(a[1].split(".")))

print(a[0] * a[1] // 100)

Buggy submission (verdict: Runtime Error):
from math import floor as f
a = input().split()
print(f(int(a[0]) * (int(float(a[1] * 100))) / 100))

Buggy submission (verdict: Runtime Error):
from math import floor as f
a, b = map(int, input().split())
print(f(a * b))
Problem p02753 (python)

Fixed submission:
S = list(input())
if S.count(S[0]) == 3:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
from math import floor as f
A, B = map(int, input().split(" "))

for c in range(10000):
    a = f(c * 0.08)
    b = f(c * 0.1)
    if a == A and b == B:
        print(c)
        break
else:
    print("-1")

Buggy submission (verdict: Runtime Error):
from math import floor as f
A, B = map(int, input().split(" "))

ans = []
for c in range(10000):
    a = f(c * 0.08)
    b = f(c * 0.1)
    if a == A and b == B:
        print(c)
        break
else:
    print("-1")

Buggy submission (verdict: Runtime Error):
from math import floor as f
A, B = map(int, input().split(" "))

ans = []
for c in range(10000):
    a = f(c * 0.08)
    b = f(c * 0.1)
    if a == A and b == B:
        print(c)
        break
else:
    print("-1")
Problem p02777 (python)

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

ind = S.index(U)

A[ind] -= 1

print(" ".join(list(map(str, A))))

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

ind = S.index(U)

A[ind] -= 1

print("".join(A))

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

ind = S.index(U)

A[ind] -= 1

print("".join(A))
Problem p02879 (python)

Fixed submission:
S = list(input())
if len(S) < 4:
    print(int(S[0]) * int(S[-1]))
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
S = list(input())
if len(S) > 3:
    print(int(S[0]) * int(S[1]))
else:
    print(-1)
Problem p03072 (python)

Fixed submission:
hpi = input()
count = 1
k = list(map(int, input().split(" ")))
for c in range(int(hpi) - 1):
  jo = "yes"
  n = k[:c + 2]
  for co in range(len(n) - 1):
    if n[co] > k[c + 1]:
      jo = "no"
    else:
      pass
  if jo == "yes":
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
hpi = input()
k = list(map(int, input().split(" ")))
for c in range(int(hpi) - 1):
  jo = "yes"
  n = k[:c + 2]
  for co in range(len(n) - 1):
    if n[co] > k[c]:
      jo = "no"
    else:
      pass
  if jo == "yes":
    count += 1
print(count + 1)
Problem p03208 (python)

Fixed submission:
N, K = map(int, input().split())
h = [int(input()) for _ in range(N)]

h.sort()
ans = 10**10

for i in range(N - K + 1):
    ans_ = h[i + K - 1] - h[i]
    ans = min(ans, ans_)

print(ans)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
h = [int(input()) for _ in range(N)]

h.sort()
ans = 10**10

for i in range(N - K + 1):
    ans_ = h[i + 2] - h[i]
    ans = min(ans, ans_)

print(ans)