Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
str = ''

while(N != 0):
    if N % 2:
        N -= 1
        N //= -2
        str += '1'
    else:
        N //= -2
        str += '0'
        
if str = '':
    print(0)
else:
    print(str[::-1])


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

while(N != 0):
    if N % 2:
        N -= 1
        N //= -2
        str += '1'
    else:
        N //= -2
        str += '0'

if str == '':
    print(0)
else:
    print(str[::-1])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
num = N

while num % N != 0 or num % 2 != 0:
    num += 1

print(num)

Fixed submission:
N = int(input())

if N % 2:
    print(2*N)
else:
    print(N)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

l = [1]
for i in range(2, 999):
    l.append(l[i-2] + i)
    
diff = b - a

print(l[diff-1] - b)


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

l = [1]
for i in range(2, 1000):
    l.append(l[i-2] + i)
    
diff = b - a

print(l[diff-1] - b)
Buggy python submission (verdict: Time Limit Exceeded):
N, C = map(int, input().split())
D = [list(map(int, input().split())) for _ in range(C)]
c = [list(map(lambda x: int(x)-1, input().split())) for _ in range(N)]

cost = [[0] * C for _ in range(3)]
for p in range(C):
    for i in range(N):
        for j in range(N):
            #グループごとにかかるコストの計算
            cost[(i+j)%3][p] += D[c[i][j]][p]

res = 10 ** 9
p = [0] * 3
for p[0] in range(C):
    for p[1] in range(C):
        if p[0] == p[1]:
            continue
        for p[2] in range(C):
            if p[2] == p[0] or p[1] == p[2]:
                continue
            tmp = 0
            for i in range(3):
                tmp += cost[i][p[i]]
            res = min(res, tmp)

print(res)
                


Fixed submission:
N, C = map(int, input().split())
D = [list(map(int, input().split())) for _ in range(C)]
c = [list(map(lambda x: int(x)-1, input().split())) for _ in range(N)]

cost = [[0] * C for _ in range(3)]
for p in range(C):
    for i in range(N):
        for j in range(N):
            #グループごとにかかるコストの計算
            cost[(i+j)%3][p] += D[c[i][j]][p]

res = 10 ** 9
p = [0] * 3
for p[0] in range(C):
    for p[1] in range(C):
        if p[0] == p[1]:
            continue
        for p[2] in range(C):
            if p[2] == p[0] or p[1] == p[2]:
                continue
            tmp = 0
            for i in range(3):
                tmp += cost[i][p[i]]
            res = min(res, tmp)

print(res)

Buggy python submission (verdict: Runtime Error):
N, C = map(int, input().split())
D = [list(map(int, input().split())) for _ in range(C)]
c = [list(map(lambda x: int(x)-1, input().split())) for _ in range(N)]

cost = [[0] * 3 for _ in range(C)]
for p in range(C):
    for i in range(N):
        for j in range(N):
            #グループごとにかかるコストの計算
            cost[(i+j)%3][p] += D[c[i][j]][p]

res = 10 ** 9
p = [0] * 3
for p[0] in range(C):
    for p[1] in range(C):
        if p[0] == p[1]:
            continue
        for p[2] in range(C):
            if p[2] == p[0] or p[1] == p[2]:
                continue
            tmp = 0
            for i in range(3):
                tmp += cost[i][p[i]]
            res = min(res, tmp)

print(res)
                

Fixed submission:
N, C = map(int, input().split())
D = [list(map(int, input().split())) for _ in range(C)]
c = [list(map(lambda x: int(x)-1, input().split())) for _ in range(N)]

cost = [[0] * C for _ in range(3)]
for p in range(C):
    for i in range(N):
        for j in range(N):
            #グループごとにかかるコストの計算
            cost[(i+j)%3][p] += D[c[i][j]][p]

res = 10 ** 9
p = [0] * 3
for p[0] in range(C):
    for p[1] in range(C):
        if p[0] == p[1]:
            continue
        for p[2] in range(C):
            if p[2] == p[0] or p[1] == p[2]:
                continue
            tmp = 0
            for i in range(3):
                tmp += cost[i][p[i]]
            res = min(res, tmp)

print(res)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
L = []
for i in range(1, N-1):
    a = set()
    b = set()
    for j in S[:i]:
        a.add(j)
    for k in S[i:]:
        b.add(k)
    count = len(a & b)
    L.append(count)

print(max(L))


Fixed submission:
N = int(input())
S = input()
L = []
for i in range(1, N):
    a = set()
    b = set()
    for j in S[:i]:
        a.add(j)
    for k in S[i:]:
        b.add(k)
    count = len(a & b)
    L.append(count)

print(max(L))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()
num_E = []
num_W = []
num_All = []

for i in range(N):
  num_E.append(S[i+1:].count('E'))
  num_W.append(S[:i].count('W'))

num_All = [x + y for (x, y) in zip(num_E, num_W)]
print(min(num_All))


Fixed submission:
N = int(input())
S = input()
num_E = []
num_W = []
num_All = []
count_W = 0
count_E = 0

for i in range(N):
  if S[i] == 'W':
    count_W += 1
  if S[N-i-1] =='E':
    count_E += 1
  num_W.append(count_W)
  num_E.append(count_E)

num_E.reverse()
num_All = [x + y for (x, y) in zip(num_W, num_E)]

print(min(num_All)-1)
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input())

dist1 = abs(a - b)
dist2 = abs(b - c)

if dist1 <= d and dist2 <= d:
    print('Yes')
else:
    print('No')
    

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

dist1 = abs(a - b)
dist2 = abs(b - c)

if dist1 <= d and dist2 <= d or abs(a - c) <= d:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
K = int(input())
S = []
ss = ''
w = []
for i in range(len(s)):
    if s[i] in w:
        pass
    else:
        S.append(s[i])
        w.append(s[i])
    for j in range(i+1, K+i+1):
        ss = ''
        if j >= len(s):
            continue
        ss = s[i] + s[i+1:j+1]
        if ss in w:
            continue
        S.append(ss)
        w.append(ss)

S.sort()

print(S[K-1])

Fixed submission:
s = input()
K = int(input())
S = set()

for i in range(len(s)):
    S.add(s[i])
    for j in range(i+1, K+i+1):
        ss = ''
        if j >= len(s):
            continue
        ss = s[i] + s[i+1:j+1]
        S.add(ss)
        
S = list(S)
S.sort()

print(S[K-1])
Buggy python submission (verdict: Runtime Error):
A, B, C, X, Y = map(int, input().split())

while X > 0 or Y > 0:
    if A + B > C:
        sum += C
        X -= 1
        Y -= 1
    else:
        sum += A + B
        X -= 1
        Y -= 1
    if X > 0 and Y > 0:
        continue
    if X > 0:
        if A > C:
            sum += C
            X -= 1
            Y -= 1
        else:
            sum += A
            X -= 1
    else:
        if B > C:
            sum += C
            X -= 1
            Y -= 1
        else:
            sum += B
            Y -= 1

print(sum)


Fixed submission:
A, B, C, X, Y = map(int, input().split())
sum = 0

while X > 0 or Y > 0:
    if X > 0 and Y > 0:
        if A + B > 2 * C:
            sum += 2 * C
            X -= 1
            Y -= 1
        else:
            sum += A + B
            X -= 1
            Y -= 1
    else:
        if X > 0:
            if A > 2 * C:
                sum += 2 * C
                X -= 1
                Y -= 1
            else:
                sum += A
                X -= 1
        else:
            if B > 2 * C:
                sum += 2 * C
                X -= 1
                Y -= 1
            else:
                sum += B
                Y -= 1

print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
A, B, C = map(int, input().split())
count = 0

def dfs(a, b, c, count):
    if a == b == c:
        return count
    elif a > 51 or b > 51 or c > 51:
        return 1000
    count = min(dfs(a+1, b+1, c, count+1), dfs(a, b+1, c+1, count+1),\
            dfs(a+1, b, c+1, count+1), dfs(a+2, b, c, count+1),      \
            dfs(a, b+2, c, count+1), dfs(a, b, c+2, count+1))

    return count

count = dfs(A, B, C, count)

print(count)


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

X = max(A, B, C)
K = A + B + C

if (3*X - K) % 2:
    print((3*(X+1) - K) // 2)
else:
    print((3*X - K) // 2)
Buggy python submission (verdict: Runtime Error):
N = int(input())
C = [0] * (N-1)
S = [0] * (N-1)
F = [0] * (N-1)
for i in range(N-1):
    C[i], S[i], F[i] = map(int, input().split())

for i in range(N):
    time = 0
    for j in range(i, N-1):
        if time < S[j]:
            time = S[j]
        elif time % F[j]:
            time += F[j] - (t % F[j])
        time += C[j]
        
    print(time)


Fixed submission:
N = int(input())
C = [0] * (N-1)
S = [0] * (N-1)
F = [0] * (N-1)
for i in range(N-1):
    C[i], S[i], F[i] = map(int, input().split())

for i in range(N):
    time = 0
    for j in range(i, N-1):
        if time < S[j]:
            time = S[j]
        elif time % F[j]:
            time += F[j] - (time % F[j])
        time += C[j]

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

if A + B < C + D:
    print('Left')
elif A + B == C + D:
    print('Balanced')
else:
    print('Right')


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

if A + B > C + D:
    print('Left')
elif A + B == C + D:
    print('Balanced')
else:
    print('Right')
Buggy python submission (verdict: Runtime Error):
print(input.count('1'))

Fixed submission:
s = input()

print(s.count('1'))
Buggy python submission (verdict: Runtime Error):
N = int(input())
F = [list(map(int, input().split())) for i in range(N)]
P = [list(map(int, input().split())) for i in range(N)]
ans = -10**9
v = [0] * 10

def culc():
    global ans
    score = 0
    index = 0
    if any(v) == False:
        return
    for i in range(N):
        for j in range(10):
            index += F[i][j] * v[j]
        score += P[i][index]
    ans = max(ans, score)
    return

def dfs(pos):
    if pos == 10:
        culc()
        return

    v[pos] = 0
    dfs(pos+1)
    v[pos] = 1
    dfs(pos+1)
    
    return

dfs(0)

print(ans)

Fixed submission:
N = int(input())
F = [list(map(int, input().split())) for i in range(N)]
P = [list(map(int, input().split())) for i in range(N)]
ans = -10**9
v = [0] * 10

def culc():
    global ans
    score = 0
    if any(v) == False:
        return
    for i in range(N):
        index = 0
        for j in range(10):
            index += F[i][j] * v[j]
        score += P[i][index]
    ans = max(ans, score)
    return

def dfs(pos):
    if pos == 10:
        culc()
        return

    v[pos] = 0
    dfs(pos+1)
    v[pos] = 1
    dfs(pos+1)

    return

dfs(0)

print(ans)
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
change_index = []

for i in range(len(S)-len(T)+1):
    step = 0
    for j in T:
#        if i + step >= len(S):
#            break
        if S[i+step] != j and S[i+step] != '?':
            break
        step += 1
        if step == len(T):
            change_index.append(i)

if len(change_index) or len(T) == 0:
    Sa_list = list(S.replace('?', 'a'))
    for i in change_index[0]:
        step = 0
        for j in T:
            Sa_list[i+step] = j
            step += 1
    Sa = ''.join(Sa_list)
    print(Sa)
else :
    print('UNRESTORABLE')


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

index = []
ss = []
flag = False

for i in range(len(S)-len(T)+1):
    for j in range(len(T)):
        if S[i+j] != T[j] and S[i+j] != '?':
            break
        if j == len(T) - 1:
            flag = True
            index.append(i)

if flag:
    for v in index:
        s = ''
        k = 0
        for i in range(len(S)):
            if v <= i <= v + len(T) - 1:
                s += T[k]
                k += 1
                continue
            if S[i] == '?':
                s += 'a'
            else:
                s += S[i]
        ss.append(s)
    ss.sort()
    s = ss[0]
else:
    s = 'UNRESTORABLE'

print(s)
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

N, M, R = map(int, input().split())
r = list(map(lambda x: int(x) - 1, input().split()))
A = [0] * M
B = [0] * M
C = [0] * M
for i in range(M):
    A[i], B[i], C[i] = map(int, input().split())
MAX = 10 ** 10
dist = [[MAX] * N for _ in range(N)]

for i in range(M):
    dist[A[i]-1][B[i]-1] = C[i]
    dist[B[i]-1][A[i]-1] = C[i]
    
for k in range(N):
    for i in range(N):
        for j in range(N):
            dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])

ans = 10 ** 10
for per in itertools.permutations(r, R):
    cost = 0
    for i in range(R-1):
        cost += dist[per[i]][per[i+1]]
    ans = min(ans, cost)

print(ans)

Fixed submission:
import itertools

N, M, R = map(int, input().split())
r = list(map(lambda x: int(x) - 1, input().split()))
A = [0] * M
B = [0] * M
C = [0] * M
for i in range(M):
    A[i], B[i], C[i] = map(int, input().split())
MAX = 10 ** 10
dist = [[MAX] * N for _ in range(N)]

for i in range(M):
    dist[A[i]-1][B[i]-1] = C[i]
    dist[B[i]-1][A[i]-1] = C[i]
    
for k in range(N):
    for i in range(N):
        for j in range(N):
            dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])

ans = 10 ** 10
for per in itertools.permutations(r, R):
    cost = 0
    for i in range(R-1):
        cost += dist[per[i]][per[i+1]]
    ans = min(ans, cost)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
count = 0
counter = []

for i in range(1, N+1):
    while i % 2 == 0:
        count += 1
    counter.append([count, i])
    count = 0

counter.sort()
counter.reverse()

print(counter[0][1])


Fixed submission:
N = int(input())
count = 0
counter = []

for i in range(1, N+1):
    num = i
    while num % 2 == 0:
        count += 1
        num /= 2
    counter.append([count, i])
    count = 0

counter.sort()
counter.reverse()

print(counter[0][1])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = [int(input()) for i in range(N)]
hako = []
count = 0
flag = True
i = 1

while True:
    hako.append(a[i-1])
    if hako.count(a[i-1]) == 2:
        flag = False
        break
    i = a[i-1]
    count += 1
    if i == 2:
        break

if flag:
    print(count)
else:
    print(-1)


Fixed submission:
N = int(input())
a = [int(input()) for i in range(N)]
i = 1
count = 0

for x in range(N):
  i = a[i-1]
  count += 1
  if i == 2:
    break
    
if i == 2:
  print(count)
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if A <= C <= B:
   print(“Yes”)
else:
   print(“No”)


Fixed submission:
A, B, C = map(int, input().split())
if A <= C <= B:
   print("Yes")
else:
   print("No")

Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if A <= C <= B:
   print(“Yes”)
else:
   print(“No”)


Fixed submission:
A, B, C = map(int, input().split())
if A <= C <= B:
   print("Yes")
else:
   print("No")

Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if A <= C <= B:
  print(“Yes”)
else:
  print(“No”)

Fixed submission:
A, B, C = map(int, input().split())
if A <= C <= B:
   print("Yes")
else:
   print("No")
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

mod = 10 ** 9 + 7

x_sum = 0
for i in range(n-1):
    x_sum += (x[i+1] - x[i]) * (i + 1) * (n - i - 1)
    x_sum %= mod

y_sum = 0
for i in range(n-1):
    y_sum += (y[i+1] - y[i]) * (i + 1) * (n - i - 1)
    y_sum %= mod

print((x_sum * y_sum) % mod)

Fixed submission:
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

mod = 10 ** 9 + 7

x_sum = 0
for i in range(n-1):
    x_sum += (x[i+1] - x[i]) * (i + 1) * (n - i - 1)
    x_sum %= mod

y_sum = 0
for i in range(m-1):
    y_sum += (y[i+1] - y[i]) * (i + 1) * (m - i - 1)
    y_sum %= mod

print((x_sum * y_sum) % mod)
Buggy python submission (verdict: Runtime Error):
X = int(input())

sum = 0
for i in range(1, N):
    sum += i
    if sum >= X:
        break

print(i)

Fixed submission:
X = int(input())

sum = 0
for i in range(1, 10**9+1):
    sum += i
    if sum >= X:
        break

print(i)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
power = 1

for i in range(1, N+1):
    power *= i
    
amari = power % (10**9 + 7)

print(amari)

Fixed submission:
N = int(input())
power = 1

for i in range(1, N+1):
  power *= i
  power %= 10**9 + 7

print(power)
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())
count = 0

for i in range(K+1):
  for j in range(K+1):
    for k in range(K+1):
      if i + j + k == S:
        count += 1
        
print(count)


Fixed submission:
K, S = map(int, input().split())
count = 0

for i in range(K+1):
  for j in range(K+1):
    k = S - i - j
    if 0 <= k <= K:
      count += 1
        
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = map(int, input().split())
count = 0

for i in range(a, b+1):
    if i % x == 0:
        count += 1

print(count)


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

nb = b // x + 1
na = (a-1) // x + 1 if a > 0 else 0

print(nb - na)

Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = map(int, input().split())
count = 0

for i in range(a, b+1):
  if i % x == 0:
    count += 1

print(count)

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

nb = b // x + 1
na = (a-1) // x + 1 if a > 0 else 0

print(nb - na)
Buggy python submission (verdict: Runtime Error):
s = input()

if 'E' in s and 'W' in s:
    if 'N' in s and 'S' in s:
        print('Yes')
    elif 'N' in s or in 'S' in s:
        print('No')
    else:
        print('Yes')
elif 'E' in s or 'W' in s:
    print('No')
else:
    print('Yes')


Fixed submission:
s = input()

if 'E' in s and 'W' in s:
    if 'N' in s and 'S' in s:
        print('Yes')
    elif 'N' in s or 'S' in s:
        print('No')
    else:
        print('Yes')
elif 'E' in s or 'W' in s:
    print('No')
else:
    if 'N' in s and 'S' in s:
        print('Yes')
    elif 'N' in s or 'S' in s:
        print('No')
    else:
        print('Yes')
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
D = list(map(int, input().split()))
A = [i for i in range(10)]
A = set(A) - set(D)
A = list(A)
A.sort()
S = str(N)
s = ''
for i in range(len(S)):
    for j in range(len(A)):
        if int(S[i]) <= A[j]:
            s += str(A[j])
            break
if len(s) == len(S):
    print(s)
else:
    if A[0] == 0:
        s = str(A[1])
        for i in range(len(S)):
            s += str(A[0])
    else:
        s = str(A[0])
        for i in range(len(S)):
            s += str(A[1])
    print(s)

Fixed submission:
N, K = map(int, input().split())
D = list(map(int, input().split()))
A = [i for i in range(10)]
A = set(A) - set(D)
A = list(A)
A.sort()
S = str(N)
s = ''
for i in range(len(S)):
    for j in range(len(A)):
        if int(S[i]) == A[j]:
            s += str(A[j])
            break
        if int(S[i]) < A[j]:
            s += str(A[j])
            for i in range(len(S)-i-1):
                s += str(A[0])
            break
    if len(s) == len(S):
        break
            
if len(s) == len(S):
    print(s)
else:
    if A[0] == 0:
        s = str(A[1])
        for i in range(len(S)):
            s += str(A[0])
    else:
        s = str(A[0])
        for i in range(len(S)):
            s += str(A[0])
    print(s)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
D = list(map(int, input().split()))
A = [i for i in range(10)]
A = set(A) - set(D)
A = list(A)
A.sort()
S = str(N)
s = ''
for i in range(len(S)):
    for j in range(len(A)):
        if int(S[i]) <= A[j]:
            s += str(A[j])
            break
if len(s) == len(S):
    print(s)
else:
    if A[0] == 0:
        s = A[1]
        for i in range(len(S)):
            s += A[0]
    else:
        s = A[0]
        for i in range(len(S)):
            s += A[1]
    print(s)

Fixed submission:
N, K = map(int, input().split())
D = list(map(int, input().split()))
A = [i for i in range(10)]
A = set(A) - set(D)
A = list(A)
A.sort()
S = str(N)
s = ''
for i in range(len(S)):
    for j in range(len(A)):
        if int(S[i]) == A[j]:
            s += str(A[j])
            break
        if int(S[i]) < A[j]:
            s += str(A[j])
            for i in range(len(S)-i-1):
                s += str(A[0])
            break
    if len(s) == len(S):
        break
            
if len(s) == len(S):
    print(s)
else:
    if A[0] == 0:
        s = str(A[1])
        for i in range(len(S)):
            s += str(A[0])
    else:
        s = str(A[0])
        for i in range(len(S)):
            s += str(A[0])
    print(s)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
s = 1

for i in range(n):
    s *= a[i]

if s <= 10**18:
    print(s)
elif s > 10**18:
    print("-1")


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

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
s = 1

for i in range(n):
    s *= a[i]

if s < 10**18:
    print(s)
elif s > 10**18:
    print(-1)


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

for p in range(13, 1250):
	if int(p * 0.08) == A and int(p * 0.1) == B:
		print(p)
		exit()

print(-1)


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

for p in range(13, 1250):
	if int(p * 0.08) == A and int(p * 0.1) == B:
		print(p)
		exit()

print(-1)

Buggy python submission (verdict: Runtime Error):
A, B = map(int, input())

for p in range(13, A):
	if int(p * 0.08) == A and int(p * 0.1) == B:
		print(p)
		exit()

print(-1)


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

for p in range(13, 1250):
	if int(p * 0.08) == A and int(p * 0.1) == B:
		print(p)
		exit()

print(-1)
Buggy python submission (verdict: Runtime Error):
from math import gcd

N = int(input())
A = [int(x) for x in input().split()]

ans = A[0]

for i in range(1, N):
    ans = gcd(ans, A[i])

print(ans)


Fixed submission:
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


N = int(input())
A = [int(x) for x in input().split()]

ans = A[0]

for i in range(1, N):
    ans = gcd(ans, A[i])

print(ans)
Buggy python submission (verdict: Runtime Error):
from decimal import Decimal

a, b = map( int, input().split())

a = Decimal(a)
b = Decimal(b)

print(a*b)

Fixed submission:
from decimal import Decimal

a, b = input().split()

a = Decimal(a)
b = Decimal(b)

print(int(a*b))

Buggy python submission (verdict: Runtime Error):
a, b = input().split()
a = int(a)
b = int(b*100)

print(int(a*b/100))


Fixed submission:
from decimal import Decimal

a, b = input().split()

a = Decimal(a)
b = Decimal(b)

print(int(a*b))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

ans = 0
u_l = []
for _ in range(n):
    s = input()
    if s not in u_l:
        u_l.append(s)
        ans += 1
print(ans)


Fixed submission:
n = int(input())

l = [input() for _ in range(n)]
print(len(set(l)))
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())

x = N
while x > abs(x-K):
    x = abs(x-K)

print(x)


Fixed submission:


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

A = N % K

print(min(A, abs(A - K)))