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

Fixed submission:
times = list(map(int, input().split()))
times.sort()
print(times[0] + times[1])

Buggy submission (verdict: Runtime Error):
import math
 
def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
 
def count_combinations(min_val, max_val):
    path_len = max_val - min_val - 2
    if path_len < 2:
        return 1
    twos = path_len // 2
    min_amount = twos + (path_len % 2)
    count = 0
    for i in range(min_amount, path_len + 1):
        count += comb(i, twos)
        twos -= 1
    return count
 
def conut_paths(a):
    paths = 1
    for i in range(len(a) - 1):
        paths *= count_combinations(a[i], a[i + 1])
    return paths % 1000000007
 
N, M = map(int, input().split())
A = [int(input()) for i in range(M)]
A.sort()
 
for i in range(1, M):
    if A[i - 1] + 1 == A[i]:
        print(0)
        exit()
 
A.insert(0, -1)
A.append(N + 1)
print(conut_paths(A))
Problem p02847 (python)

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

Buggy submission (verdict: Runtime Error):
def sort(str):
  return ''.join(sorted(str))

i = int(input())
alpha = input()
x = sort(alpha[i:])
y = sort(alpha[:i])
if x.endswith("Z"):
	print(x + "A" + y)
else :
	print(x + y)
Problem p02771 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a==b!=c:
    print('Yes')
elif a==c!=b:
    print('Yes')
elif b==c!=a:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import sys
def input(): return sys.stdin.readline().strip()
from collections import Counter
def resolve():
    n=int(input())
    l=[input() for i in range(n)]
    l.sort()
    c=Counter(l)
    maxl=[]
    syutugenmax=max(c.values())
    for name,kazu in c.items():
        if kazu==syutugenmax:
            maxl.append(name)
    maxl.sort()
    for i in maxl:
        print(i)
resolve()
Problem p02773 (python)

Fixed submission:
from collections import Counter
def resolve():
    n=int(input())
    l=[input() for i in range(n)]
    c=Counter(l)
    maxl=[]
    cntmax=max(c.values())
    for name,kazu in c.items():
        if kazu==cntmax:
            maxl.append(name)
    maxl.sort()
    for i in maxl:
        print(i)
resolve()

Buggy submission (verdict: Runtime Error):
import sys
def input(): return sys.stdin.readline().strip()
from collections import Counter
def resolve():
    n=int(input())
    l=[input() for i in range(n)]
    l.sort()
    setl = list(set(l))
    setl.sort()
    c=Counter(l)
    ll=[*c.values()]
    for i in range(len(setl)):
        if ll[i]==max(ll):
            print(setl[i])
resolve()
Problem p02819 (python)

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    x=int(input())
    ans=x
    while True:
        flag=False
        for i in range(2,int(x**0.5)):
            if ans%i==0:
                flag=True
                break
        if flag:
            ans+=1
            continue
        else:
            break
    print(ans)
resolve()

Buggy submission (verdict: Runtime Error):
    x=int(input())
    ans=x
    while True:
        flag=False
        for i in range(2,int(x**0.5)):
            if ans%i==0:
                flag=True
                break
        if flag:
            ans+=1
            continue
        else:
            break
    print(ans)
resolve()
Problem p02831 (python)

Fixed submission:
import sys


def input(): return sys.stdin.readline().strip()


import fractions


def resolve():
    a, b = map(int, input().split())
    print((a * b) // fractions.gcd(a, b))
resolve()

Buggy submission (verdict: Runtime Error):
import sys
def input(): return sys.stdin.readline().strip()
import math
def resolve():
    a,b=map(int, input().split())
    print((a*b)//math.gcd(a,b))
resolve()

Buggy submission (verdict: Runtime Error):
import sys
def input(): return sys.stdin.readline().strip()
import math
def resolve():
    a,b=map(int, input().split())
    print(a*b//math.gcd(a,b))
resolve()
Problem p03186 (python)

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    a,b,c=map(int, input().split())
    cnt=0
    if a+b>=c-1:
        print(b+c)
    else:
        print(a+b+1+b)
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    a,b,c=map(int, input().split())
    cnt=0
    if a+b>=c-1:
        print(b+c)
    else:
        print(a+b+1+)
resolve()
Problem p03307 (python)

Fixed submission:

import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    import fractions
    n=int(input())
    print(n * 2 // fractions.gcd(n, 2))
resolve()

Buggy submission (verdict: Runtime Error):

import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    import functools
    n=int(input())
    print(n * 2 // functools.gcd(n, 2))
resolve()

Buggy submission (verdict: Runtime Error):

import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    import functools
    n=int(input())
    n * 2 // functools.gcd(n, 2)

resolve()

Buggy submission (verdict: Runtime Error):

import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())
    import math
    def lcm(x, y):
        return (x * y) // math.gcd(x, y)
    print(lcm(2,n))
resolve()
Problem p03705 (python)

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    import itertools
    n,a,b=map(int, input().split())
    if n==1 and a==b:
        print(1)
    elif n==1 and a!=b:
        print(0)
    elif b<a:
        print(0)
    else:
        print((a+(n-1)*b)-((n-1)*a+b)+1)
resolve()

Buggy submission (verdict: Runtime Error):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    import itertools
    n,a,b=map(int, input().split())
    if n==1 and a==b:
        print(1)
    elif n==1 and a!=b:
        print(0)
    elif b<a:
        print(0)
    else:
        l=list(range(a,b+1))
        c=itertools.combinations_with_replacement(l,n-2)
        check=[]
        cnt=0
        for i in c:
            if sum(i) not in check:
                check.append(sum(i))
                cnt+=1
        print(cnt)
resolve()

Buggy submission (verdict: Runtime Error):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n,a,b=map(int, input().split())
    if n==1 and a==b:
        print(1)
    elif n==1 and a!=b:
        print(0)
    elif b<a:
        print(0)
    else:
        import itertools
        l=list(range(a,b+1))
        c=itertools.combinations_with_replacement(l,n-2)
        check=[]
        cnt=0
        for i in c:
            if sum(i) not in check:
                check.append(sum(i))
                cnt+=1
        print(cnt)
resolve()
Problem p02699 (python)

Fixed submission:
s,w=map(int,input().split())
if s>w:
    print('safe')
else :
    print('unsafe')

Buggy submission (verdict: Runtime Error):
S, W = map(int, input().split())
    if S >= W:
        print('safe')
    else S < W:
      print('unsafe')

Buggy submission (verdict: Runtime Error):
S, W = map(int, input().split())
    if S >= W:
        print('safe')
    else S < W:
      print('unsafe')

Buggy submission (verdict: Runtime Error):
S, W = map(int, input().split())
    if S >= W:
        print('safe')
    else S < W
      print('unsafe')

Buggy submission (verdict: Runtime Error):
S, W = map(int, input().split())
    if S >= W:
        print('safe')
    else S < W
      print('unsafe')

Buggy submission (verdict: Runtime Error):
S, W = map(int, input().split())
    if S >= W:
        print('safe')
    else:
      S < W
      print('unsafe')

Buggy submission (verdict: Runtime Error):
S, W = map(int, input().split())
    if S >= W:
        print('safe')
    else:
      S < W:
      print('unsafe')

Buggy submission (verdict: Runtime Error):
S,W = int(input())
    if S =< W:
        print('unsafe')
    else:
    S > W:
        print('safe')

Buggy submission (verdict: Runtime Error):
S,W = input()
    if S < W:
        print('unsafe')
    else:
    S > W:
        print('safe')

Buggy submission (verdict: Runtime Error):
S,W = input()
    if S < W
        print('unsafe'):
    else S > W
        print('safe'):

Buggy submission (verdict: Runtime Error):
S,W = input()
    if S < W
        print('unsafe')
    else S > W
        print('safe')
Problem p02682 (python)

Fixed submission:
a, b, c, k = map(int, input().split())
if k <= (a + b):
    print(min(a, k))
else:
    print(a - min(c, (k - a - b)))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = list(map(int, input().split()))
now = 1
cnt = 0
loop = 0
cnts = [-1] * n
cnts[now - 1] = cnt
visited = [False] * n
visited[now - 1] = True
li = [now]

while True:
    cnt += 1
    now = a[now - 1]
    li.append(now)

    if cnt == k:
        print(now)
        exit()
    if visited[now - 1]:
        loop = (cnt - cnts[now - 1])
        pre = cnts[now - 1]
        print(li[pre + (k - pre) % loop])
        exit()

    cnts[now - 1] = cnt
    visited[now - 1] = True
Problem p03013 (python)

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

for i in range(m):
    a.append(int(input().strip()))

broken = [False] * (n + 1)

for i in range(m):
    broken[a[i]] = True

dp = []
dp.append(1)

if (broken[1]):
    dp.append(0)
else:
    dp.append(1)

for i in range(2, n + 1, 1):
    if (broken[i]):
        dp.append(0)
    else:
        dp.append((dp[i - 1] + dp[i - 2]) % 1000000007)

print(dp[n])

Buggy submission (verdict: Runtime Error):
n, m = list(map(int, input().split()))
a = []

for i in range(m):
    a.append(int(input().strip()))

broken = [False] * (n + 1)

for i in range(m):
    broken[a[i]] = True

dp = []
dp.append(1)

if (broken[1]):
    dp.append(0)
else:
    dp.append(1)

for i in range(2, n + 1, 1):
    if (broken[i]):
        dp.append(0)
    else:
        dp.append((dp[i - 1] + dp[i - 2]) % 1_000_000_007)

print(dp[n])
Problem p03326 (python)

Fixed submission:
from itertools import product

n, m = map(int, input().split())
xyz = [list(map(int, input().split())) for _ in range(n)]
ans = 0

for e in product([1, -1], [1, -1], [1, -1]):
    xyz.sort(key=lambda v: (v[0] * e[0]) + (v[1] * e[1]) + (v[2] * e[2]))
    tmp = xyz[:m]
    ans = max(ans, abs(sum([e[0] for e in tmp])) + abs(sum([e[1] for e in tmp])) + abs(sum([e[2] for e in tmp])))
print(ans)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
xyz = [list(map(int, input().split())) for _ in range(n)]
ans = 0

for elem in combinations(xyz, m):
    x = abs(sum([e[0] for e in elem]))
    y = abs(sum([e[1] for e in elem]))
    z = abs(sum([e[2] for e in elem]))
    ans = max(ans, x + y + z)
print(ans)
Problem p02623 (python)

Fixed submission:

import numpy as np
a,b,k=map(int,input().split())
n=list(map(int,input().split()))
m=list(map(int,input().split()))
n.insert(0,0)
m.insert(0,0)
n=np.array(n)
m=np.array(m)
n=n.cumsum()
m=m.cumsum()
ans=0
j=len(m)-1
for i in range(len(n)):
    if n[i]>k:
        break
    while m[j]>k-n[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()))

count = 0
while True:
    if A[0]-B[0] >= 0:
        K -= B[0]
        if K >= 0:
            count += 1
            B.pop(0)
        else:
            break
    else:
        K -= A[0]
        if K >= 0 :
            count += 1
            A.pop(0)
        else:
            break        
print(count)

Buggy submission (verdict: Runtime Error):

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

count = 0
while True:
    if A[0]-B[0] >= 0:
        K = K-B[0]
        if K >= 0 :
            count += 1
            B.pop(0)
        else:
            break

    else:
        K = K-A[0]
        if K >= 0 :
            count += 1
            A.pop(0)
        else:
            break        
print(count)
Problem p02627 (python)

Fixed submission:
a = str(input())

if a.isupper():
    print('A')
else:
    print('a')

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]
x=0
for i in a:
    x^=i

b=[x^i for i in a]
for i in b:
    print(i,end=" ")
Problem p02990 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10 ** 6)


def input():
    return sys.stdin.readline()[:-1]


def main():
    N,K = map(int, input().split())
    mod = 10**9+7
    fac = [1]*(N+1)
    rev = [1]*(N+1)
    
    for i in range(1,N+1):
        fac[i] = i*fac[i-1]%mod
        rev[i] = pow(fac[i], mod-2, mod)
    
    comb = lambda a,b:(fac[a]*rev[a-b]*rev[b])%mod
    for i in range(1, K+1):
        if i >N-K+1:
            print(0)
            continue
        print(comb(N-K+1, i)*comb(K-1, i-1)%mod)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10 ** 6)

MOD = 10**9 + 7


def input():
    return sys.stdin.readline()[:-1]

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  # 10
    """

    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        # 階乗のリストと階乗のmod逆元のリストを返す O(n)
        # self.make_modinv_list()が先に実行されている必要がある
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        # 0からnまでのmod逆元のリストを返す O(n)
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * \
                modinv[self.mod % i] % self.mod
        return modinv


def main():
    N,K = map(int, input().split())
    comb = Combination()
    for i in range(1, K+1):
        print(comb(N-K+1, i)*comb(K-1, i-1)%MOD)


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

Fixed submission:
# BFS
from collections import deque


def main():
    dx = [1, 0, -1, 0]
    dy = [0, 1, 0, -1]
    # 頂点数と辺数
    H, W = map(int, input().split())
    A = [list(input()) for _ in range(H)]
    # 全頂点を未訪問に初期化
    dist = [[-1] * W for _ in range(H)]

    ans = float('inf')
    que = deque()
    for h in range(H):
        for w in range(W):
            if A[h][w] == '#':
                que.append([h, w])
                dist[h][w] = 0

    # bfs開始 (キューが空になるまで探索を行う)
    while len(que) > 0:
        v = que.popleft()  # キューから先頭頂点を取り出す
        for i in range(4):
            nx = v[0] + dx[i]
            ny = v[1] + dy[i]
            if (0 <= nx and nx < H and 0 <= ny and ny < W and dist[nx][ny] == -1):
                que.append([nx, ny])
                dist[nx][ny] = dist[v[0]][v[1]] + 1
    ans = 0
    for h in range(H):
        for w in range(W):
            ans = max(ans, dist[h][w])
    print(ans)


if __name__ == "__main__":
    main()

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


def main():
    dx = [1, 0, -1, 0]
    dy = [0, 1, 0, -1]
    # 頂点数と辺数
    H, W = map(int, input().split())
    A = [list(input()) for _ in range(H)]
    # 全頂点を未訪問に初期化
    dist = [[-1] * W for _ in range(H)]

    ans = float('inf')
    que = deque()
    for h in range(H):
        for w in range(W):
            if A[h][w] == '#':
                que.append([h, w])
                dist[h][w] = 0

    # bfs開始 (キューが空になるまで探索を行う)
    while len(que) > 0:
        v = que.popleft()  # キューから先頭頂点を取り出す
        for i in range(4):
            nx = v[0] + dx[i]
            ny = v[1] + dy[i]
            if (0 <= nx and nx < H and 0 <= ny and ny < W and dist[nx][ny] == -1):
                que.append([nx, ny])
                dist[nx][ny] = dist[v[0]][v[1]] + 1
    print(np.max(dist))


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

Fixed submission:
n = int(input())
print(n // 2 + n % 2)

Buggy submission (verdict: Runtime Error):
import sys
n, m = map(int, input().split())
r = [-1] * n

for _ in range(m):
    s, c = map(int, input().split())
    if r[s-1] == -1 or r[s-1] == c:
        r[s-1] = c
    else:
        print(-1)
        sys.exit(0)

if r[0] == 0:
    print(-1)
    sys.exit(0)
if r[0] == -1 and n > 1:
    r[0] = 1

n_r = [0 if i == -1 else i for i in r]
result = ''.join([str(i) for i in n_r])
print(result)
Problem p02622 (python)

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

S = list(S)
T = list(T)

i = 0
j = 0

while j < len(S):
    if S[j] == T[j]:
        i = i
        j += 1
    else:
        i += 1
        j += 1

print(i)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

S = list(S)
T = list(T)

i = 0
j = 0

while j < len(S):
  if S[j] = T[j]:
    i = i
    j += 1
  else:
    i += 1
    j += 1
    
print(i)
Problem p02623 (python)

Fixed submission:
N,M,K = input().split()

N = int(N)
M = int(M)
K = int(K)

A = list(input().split())
A = [int(c) for c in A]

Sum_A = [0]
ele_A = 0
a = 0

while Sum_A[-1] + A[a] <= K:
    ele_A += A[a]
    a += 1
    Sum_A.append(ele_A)
    if a == len(A):
        break

B = list(input().split())
B = [int(c) for c in B]

Sum_B = [0]
ele_B = 0
b = 0

while Sum_B[-1] + B[b] <= K:
    ele_B += B[b]
    b += 1
    Sum_B.append(ele_B)
    if b == len(B):
        break

h = len(Sum_A) - 1
i = 0
j = 0

while h >= 0:
    while Sum_A[h] + Sum_B[i] <= K:
        j = max(j,h + i)
        if i == len(Sum_B) - 1:
            break
        i += 1
    if h == 0:
        break
    h -= 1

print(j)

Buggy submission (verdict: Runtime Error):
N,M,K = input().split()

N = int(N)
M = int(M)
K = int(K)

A = list(input().split())
A = [int(c) for c in A]

B = list(input().split())
B = [int(c) for c in B]

i = 0
j = 0

a = 0
b = 0

while j < K:
    if len(A) == 0 and len(B) == 0:
        break
    elif len(A) == 0:
        if j + B[b] <= K:
            j += B[b]
            i += 1
            b += 1
        else:
            break
    elif len(B) == 0:
        if j + A[a] <= K:
            j += A[a]
            i += 1
            a += 1
        else:
            break
    else:
        if A[a] < B[b]:
            if j + A[a] <= K:
                j += A[a]
                i += 1
                a += 1
            else:
                break
        else:
            if j + B[b] <= K:
                j += B[b]
                i += 1
                b += 1
            else:
                break

print(i)
Problem p02622 (python)

Fixed submission:
s = input()
t = input()
count = 0
for i in range(len(s)):
    if s[i] != t[i]:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
s = list(map(str,input().split()))
t = list(map(str,input().split()))
count = 0
for i in range(len(s)):
    if(s[i] == t[i]):
        count ++
print(count)
Problem p02627 (python)

Fixed submission:
alpha=str(input())
check=alpha.isupper()

if check==True:
    print("A")
else:
    print("a")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
num=[]
for i in range(100000):
    num.append(A.count(i))

total=sum(A)
for i in range(Q):
    B, C = map(int, input().split())
    print(total + (C - B) * num[B])
    total=total + (C - B) * num[B]
    num[C] += num[B]
    num[B] -= num[B]

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
num=[]
amax=max(A)
for i in range(amax):
    num.append(A.count(i))

total=sum(A)
for i in range(Q):
    B, C = map(int, input().split())
    print(total + (C - B) * num[B])
    total=total + (C - B) * num[B]
    num[C] += num[B]
    num[B] -= num[B]
Problem p02622 (python)

Fixed submission:
S=input()
T=input()
k=0
for i in range(len(S)):
  if S[i]!=T[i]:
    k+=1
print(k)

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
k=0
for i in range(len(S))
	if S[i]!=T[i]:
    	k+=1
print(k)

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
k=0
for i in range(len(S))
	if S[i]==T[i]:
    	continue
  	else:
    	k+=1
print(k)

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
k=0
for i in range(len(S))
	if S[i]==T[i]:
    	continue
  	else:
    	k+=1

print(k)

Buggy submission (verdict: Runtime Error):
ソースコード 

Copy
Copy
S=input()
T=input()
k=0
i=0

while i==len(S)
	if S[i]==T[i]:
  	else:
      k+=1
    i+=1
    end

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
k=0
i=0
while S!=T	
	if S[i]==T[i]:
  	else:
      k+=1
    i+=1

print(k)
Problem p02623 (python)

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

for i in range(n):
    if i == 0:
        continue
    else:
        a[i] += a[i-1]

for i in range(m):
    if i == 0:
        continue
    else:
        b[i] += b[i - 1]

a = [0]+a
b = [0]+b

i = 0
j = m
ans = 0

while a[i] <= k:
    while b[j] > k-a[i]:
        j -= 1
        if j<0:
            j=0
            break

    ans =max(ans,i+j)
   
    i += 1
    if i > n:
        break

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()))

for i in range(n):
    if i == 0:
        continue
    else:
        a[i] += a[i-1]

for i in range(m):
    if i == 0:
        continue
    else:
        b[i] += b[i - 1]

a = [0]+a
b = [0]+b

i = 0
j = m
ans = 0

while a[i] <= k:
    while b[j] > k-a[i]:
        j -= 1
    ans = i+j
    ans =max(ans,i+j)
    i += 1

print(ans)
Problem p02659 (python)

Fixed submission:
x=input().split()
a=int(x[0])
b=round(float(x[1])*100)
print(int(a*b//100))

Buggy submission (verdict: Runtime Error):
x=input().split()
a=int(x[0])
b=round(x[1]*100)

print(int(a*b//100))

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


print(int(a*(b*100)/100)
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]
ans = 0

for i in range(n):
    A.append(A[i] + a[i])

for i in range(m):
    B.append(B[i] + b[i])

j = m

for i in range(n + 1):
    if A[i] > k:
        break
    while A[i] + B[j] > k:
        j -= 1
    ans = max(ans, i + j)

print(ans)

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

a=0;b=0
cnt=0
while a < len(A) and b < len(B) and K > 0:
  a_ = A[a]
  b_ = B[b]
    
  if a_ > K and b_ > K:
    break
      
  if a_ < b_ and a_ <= K:
    cnt += 1
	K -= a_
    a += 1
  elif a_ >= b_ and b_ <= K:
    cnt += 1
    K -= b_
    b += 1
      
print(cnt)

Buggy submission (verdict: Runtime Error):
a=0;b=0
cnt=0
while a < len(A) and b < len(B) and K > 0:
	a_ = A[a]
	b_ = B[b]
    
    if a_ > K and b_ > K:
      break
      
    if a_ < b_ and a_ <= K:
		cnt += 1
		K -= a_
        a += 1
	elif a_ >= b_ and b_ <= K:
      cnt += 1
      K -= b_
      b += 1
      
print(cnt)

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

a=0;b=0
cnt=0
while a < len(A) and b < len(B) and K > 0:
	a_ = A[a]
	b_ = B[b]
    
    if a_ > K and b_ > K:
      break
      
    if a_ < b_ and a_ <= K:
		cnt += 1
		K -= a_
		A.pop(0)
	elif a_ >= b_ and b_ <= K:
      cnt += 1
      K -= b_
      B.pop(0)
      
print(cnt)
Problem p02622 (python)

Fixed submission:
s=input()
t=input()
o=0
for i in range(len(s)):
  if s[i]!=t[i]:
    o+=1
print(o)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
o=0
for i in range(len(s)):
  if s[i]!=t[i]:
		o+=1
print(o)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
o=0
for x,y in s,t:
  if x != y:
    o+=1
print(o)