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

Fixed submission:
#!/usr/bin/env python3

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

def gcd(a, b):
    if a > b:
        a, b = b, a
    # assert(a <= b)
    if b%a == 0:
        return a
    else:
        return gcd(b%a, a)

def gcd_many(l):
    # if len(l) == 1:
    #     return l
    # elif len(l) == 2:
    #     return gcd(l[0], l[1])
    # else:
    #     return gcd(l[0], gcd_many(l[1:]))
    if len(l) == 1:
        return l[0]
    g = l[0]
    for i in range(1,len(l)):
        g = gcd(g, l[i])
    return g

Amax = max(A)
g = gcd_many(A)

possible = "POSSIBLE"
impossible = "IMPOSSIBLE"


if K > Amax:
    print(impossible)
else:
    if K % g == 0:
        print(possible)
    else:
        print(impossible)

Buggy submission (verdict: Runtime Error):
hoge
fuga

piyo

Buggy submission (verdict: Runtime Error):
hoge
fuga

Buggy submission (verdict: Runtime Error):
hoge

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

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

def gcd(a, b):
    if a > b:
        a, b = b, a
    # assert(a <= b)
    if b%a == 0:
        return a
    else:
        return gcd(b%a, a)

def gcd_many(l):
    # if len(l) == 1:
    #     return l
    # elif len(l) == 2:
    #     return gcd(l[0], l[1])
    # else:
    #     return gcd(l[0], gcd_many(l[1:]))
    if len(l) == 1:
        return l
    g = l[0]
    for i in range(1,len(l)):
        g = gcd(g, l[i])
    return g

Amax = max(A)
g = gcd_many(A)

possible = "POSSIBLE"
impossible = "IMPOSSIBLE"


if K > Amax:
    print(impossible)
else:
    if K % g == 0:
        print(possible)
    else:
        print(impossible)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

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

def gcd(a, b):
    if a > b:
        a, b = b, a
    # assert(a <= b)
    if b%a == 0:
        return a
    else:
        return gcd(b%a, a)

def gcd_many(l):
    if len(l) == 1:
        return l
    elif len(l) == 2:
        return gcd(l[0], l[1])
    else:
        return gcd(l[0], gcd_many(l[1:]))

Amax = max(A)
g = gcd_many(A)

possible = "POSSIBLE"
impossible = "IMPOSSIBLE"


if K > Amax:
    print(impossible)
else:
    if K % g == 0:
        print(possible)
    else:
        print(impossible)
Problem p03722 (python)

Fixed submission:
# from math import inf
inf = 10**50

N, M = map(int, input().split())
edges = []
for j in range(M):
    edges.append(list(map(int, input().split())))

d = [0] + ([-inf]*(N-1))
pred = [None] * N

for i in range(N-1):
    for j in range(M):
        u = edges[j][0]-1
        v = edges[j][1]-1
        w = edges[j][2]
        if (d[v] < d[u] + w) and (d[u] != -inf):
            d[v] = d[u] + w
            pred[v] = u

positive_loop = False
for i in range(N):
    for j in range(M):
        u = edges[j][0]-1
        v = edges[j][1]-1
        w = edges[j][2]
        if (d[u] + w > d[v]) and (d[u] != -inf):
            d[v] = d[u] + w
            if v == N-1:
                positive_loop = True
                break
    if positive_loop:
        break

if positive_loop:
    print("inf")
else:
    print(d[N-1])

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

N, M = map(int, input().split())
edges = []
for j in range(M):
    edges.append(list(map(int, input().split())))

d = [0] + ([-inf]*(N-1))
pred = [None] * N

for i in range(N-1):
    for j in range(M):
        u = edges[j][0]-1
        v = edges[j][1]-1
        w = edges[j][2]
        if d[v] < d[u] + w:
            d[v] = d[u] + w
            pred[v] = u

positive_loop = False
for j in range(M):
    u = edges[j][0]-1
    v = edges[j][1]-1
    w = edges[j][2]
    if d[u] + w > d[v]:
        positive_loop = True

if positive_loop:
    print("inf")
else:
    print(d[N-1])

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

N, M = map(int, input().split())
edges = []
for j in range(M):
    edges.append(list(map(int, input().split())))

d = [0] + ([-inf]*(N-1))
pred = [None] * N

for i in range(N-1):
    for j in range(M):
        u = edges[j][0]-1
        v = edges[j][1]-1
        w = edges[j][2]
        if d[v] < d[u] + w:
            d[v] = d[u] + w
            pred[v] = u

positive_loop = False
for j in range(M):
    u = edges[j][0]-1
    v = edges[j][1]-1
    w = edges[j][2]
    if d[u] + w > d[v]:
        positive_loop = True

if positive_loop:
    print("inf")
else:
    print(d[N-1])
Problem p03994 (python)

Fixed submission:
#!/usr/bin/env python3
import sys
try: from typing import Any, Union, List, Tuple, Dict
except ImportError: pass
def debug(*args): print(*args, file=sys.stderr)
def exit(): sys.exit(0)


s = input()
K = int(input())
n = len(s)


def code(s):
    return ord(s)-97

def char(c):
    c = c % 26
    return chr(c+97)


# ans = ""
ans_list = []
for p in range(n):
    c = code(s[p])
    if c == 0:
        # ans += "a"
        ans_list.append("a")
        continue
    if 26-c > K:
        # ans += s[p]
        ans_list.append(s[p])
        continue
    # ans += "a"
    ans_list.append("a")
    K -= 26-c
ans = "".join(ans_list)
ans = ans[:-1] + char(code(ans[-1])+K)

print(ans)

Buggy submission (verdict: Runtime Error):
jkl;

Buggy submission (verdict: Runtime Error):
hoge
Problem p04048 (python)

Fixed submission:
#!/usr/bin/env python3
import sys
def debug(*args): print(*args, file=sys.stderr)
def exit(): sys.exit(0)

sys.setrecursionlimit(100000)

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

def f(x, n):
    if x == 0 or x == n:
        return 0
    debug(x,n)
    # if 2*x == n:
    #     return 3*x
    if x % (n-x) == 0:
        return 3*x
    if 2*x < n:
        # return f(x, n-x) + 3*x# n + x
        return f(n-x, n)
    a = x//(n-x) + 1
    t = a*(n-x) - x
    return f(n-x-t, n-x) + 3*x # + t

print(f(X, N))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys
def debug(*args): print(*args, file=sys.stderr)
def exit(): sys.exit(0)

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

def f(x, n):
    debug(x,n)
    # if 2*x == n:
    #     return 3*x
    if x % (n-x) == 0:
        return 3*x
    if 2*x < n:
        return f(x, n-x) + 3*x# n + x
    a = x//(n-x) + 1
    t = a*(n-x) - x
    return f(n-x-t, n-x) + 3*x # + t

print(f(X, N))
Problem p03142 (python)

Fixed submission:
import sys
sys.setrecursionlimit(1000000)

n,m=map(int,input().split())
e=[]
tu=[[] for x in range(n+1)]
d=[0]*(n+1)
fa=[0]*(n+1)
for i in range(n-1+m):
    u,v=map(int,input().split())
    e.append((u,v))
    tu[u].append(v)
    d[v]+=1

def dfs(x):
    if x in vis:
        return
    vis.add(x)
    for t in tu[x]:
        dfs(t)
    tp.append(x)

vis=set()
tp=[]
for i in range(1,n+1):
    if d[i]==0:
      dfs(i)

d=[0]*(n+1)
tp.reverse()
for i in tp:
    for t in tu[i]:
        d[t]=max(d[t],d[i]+1)

for i in e:
    u,v=i
    if d[u]+1==d[v]:
        fa[v]=u

for i in range(1,n+1):
    print(fa[i])

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
e=[]
tu=[[] for x in range(n+1)]
d=[0]*(n+1)
fa=[0]*(n+1)
for i in range(n-1+m):
    u,v=map(int,input().split())
    e.append((u,v))
    tu[u].append(v)
    d[v]+=1

def dfs(x):
    if x in vis:
        return
    vis.add(x)
    for t in tu[x]:
        dfs(t)
    tp.append(x)

vis=set()
tp=[]
for i in range(1,n+1):
    if d[i]==0:
      rt=i
      dfs(i)

d=[0]*(n+1);
tp.reverse()
for i in tp:
    for t in tu[i]:
        d[t]=max(d[t],d[i]+1)

for i in e:
    u,v=i
    if d[u]+1==d[v]:
        fa[v]=u

for i in range(1,n+1):
    print(fa[i])

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
e=[]
tu=[[] for x in range(n+1)]
d=[0]*(n+1)
fa=[0]*(n+1)
for i in range(n-1+m):
    u,v=map(int,input().split())
    e.append((u,v))
    tu[u].append(v)
    d[v]+=1

def dfs(x):
    if x in vis:
        return
    vis.add(x)
    for t in tu[x]:
        dfs(t)
    tp.append(x)

vis=set()
tp=[]
for i in range(1,n+1):
    if d[i]==0:
      rt=i
      dfs(i)

d=[0]*(n+1);
tp.reverse()
for i in tp:
    for t in tu[i]:
        d[t]=max(d[t],d[i]+1)

for i in e:
    u,v=i
    if d[u]+1==d[v]:
        fa[v]=u

for i in range(1,n+1):
    print(fa[i])

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
e=[]
tu=[[] for x in range(n+1)]
d=[0]*(n+1)
fa=[0]*(n+1)
for i in range(n-1+m):
    u,v=map(int,input().split())
    e.append((u,v))
    tu[u].append(v)
    d[v]+=1

def dfs(x):
    if x in vis:
        return
    vis.add(x)
    for t in tu[x]:
        dfs(t)
    tp.append(x)

vis=set()
tp=[]
for i in range(1,n+1):
    if d[i]==0:
      rt=i
      dfs(i)

d=[0]*(n+1);
tp.reverse()
for i in tp:
    for t in tu[i]:
        d[t]=max(d[t],d[i]+1)

for i in e:
    u,v=i
    if d[u]+1==d[v]:
        fa[v]=u

for i in range(1,n+1):
    print(fa[i])
Problem p03284 (python)

Fixed submission:
nk = input()
nk_lis = nk.split()
n = int(nk_lis[0])
k = int(nk_lis[1])

if n % k == 0 :
  print(0)
elif n % k > 0:
  print(1)

Buggy submission (verdict: Runtime Error):
nk = input()
n = int(nk.split([1]))
k = int(nk.split([2]))

if n % k == 0 :
  print(0)
elif n % k > 0:
  print(1)
Problem p03773 (python)

Fixed submission:
time_input = input()
time = time_input.split()

A = int(time[0])
B = int(time[1])

if A + B > 24:
    print(A + B - 24)
elif A + B == 24:
    print(0)
else:
    print(A + B)

Buggy submission (verdict: Runtime Error):
time_input = input()
time = time_input.split()

A = time[0]
B = time[1]

if A + B > 24:
    print(A + B - 24)
elif A + B == 24:
    print(0)
else:
    print(A + B)
Problem p03219 (python)

Fixed submission:
x, y = map(int, input().split())
print(int(x + (y/2)))

Buggy submission (verdict: Runtime Error):
    x, y = map(int, input().split())
    print(int(x + (y/2)))
Problem p03251 (python)

Fixed submission:
n, m, x, y = map(int, input().split())
x_city = list(map(int, input().split()))
y_city = list(map(int, input().split()))
x_city.sort()
y_city.sort()
if y_city[0] - x_city[-1] > 0 and x < y_city[0] and x_city[-1] < y:
    print('No War')
else:
    print('War')

Buggy submission (verdict: Runtime Error):
n, m, x, y = map(int, input().split())
x_city = list(map(int, input().split()))
y_city = list(map(int, input().split()))
x_city.sort()
y_city.sort()
if y_city[0] - x_city[-1] > 0 and x < y_city[0] and x[-1] < y:
    print('No War')
else:
    print('War')
Problem p03281 (python)

Fixed submission:
n = int(input())
cnt = 0
for i in range(1, n + 1, 2):
    num_fact = 0
    for j in range(1, i + 1):
        if i % j == 0:
            num_fact += 1
    if num_fact == 8:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = [i for i in range(1, n + 1) if i % 2 == 1]
print(l)
cnt = 0
for w in l:
i = w
fct = []
b, e = 3, 0
while b * b < w:
        while i % b == 0:
        i = i // b
        e = e + 1
        if e > 0:
        fct.append((b, e))
        b, e = b + 1, 0
if i > 1:
        fct.append((i, 1))
if len(fct) > 1:
        r = 1
        for j in fct:
        r = r * (j[1] + 1)
elif len(fct) == 1:
        r = fct[0][1] + 1
else:
        r = 0
if r == 8:
        print(w, fct, r)
        cnt += 1
print(cnt)
Problem p03294 (python)

Fixed submission:
import fractions
n = int(input())
l = list(map(int, input().split()))
m = l[0]
for i in range(1, n):
    m = m * l[i] // fractions.gcd(m, l[i])
m = m - 1
ans = 0
for i in l:
    ans += m % i
print(ans)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
l = list(map(int, input().split()))
m = l[0]
for i in range(1, n):
    m = m * l[i] // math.gcd(m, l[i])
m = m - 1
ans = 0
for i in l:
    ans += m % i
print(ans)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
l = list(map(int, input().split()))
ans = l[0]
for i in range(1, n):
    ans = ans * l[i] // math.gcd(ans, l[i])
print(ans - 1)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
l = list(map(int, input().split()))
ans = a[0]
for i in range(1, n):
    ans = ans * a[i] // math.gcd(ans, a[i])
print(ans - 1)
Problem p03455 (python)

Fixed submission:
a,b = map(int,input().split())
c = a*b
if c %2 == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = a*b
if c%2==;
	print("even")
else;
	print("odd")
Problem p03206 (python)

Fixed submission:
pasok = int(input())
chris = "Christmas "
eve = "Eve "

print(chris + eve*(25-pasok))

Buggy submission (verdict: Runtime Error):
pasok = int(input())
chris = "Christmas "
eve = "Eve "

print(chris + eve*(25-pasok)
Problem p03474 (python)

Fixed submission:
a, b = [int(x) for x in input().split()]
s = input()
if s[a] == "-" and len(s) == (a+b+1) and (s[:a]+s[a+1:]).isdigit():
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a, b = [int(x) for x in input().split()]
s = input()
if s[a] == "-" and len(s) == (a+b+1) and (s[:a]+s[a+1:].isdigit()):
  print("Yes")
else:
  print("No")
Problem p03434 (python)

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

a.sort(reverse=True)

print(sum(a[0::2])-sum(a[1::2]))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(input().split())

a.sort(reverse=True)

alice = 0
bob = 0

for i in range(len(n)):
    if i % 2 == 0:
        alice = alice + int(a[i])
    else:
        bob = bob + int(a[i])

print (alice-bob)
Problem p03136 (python)

Fixed submission:
N=int(input())
l=list(map(int,input().split()))
max=max(l)
if max<sum(l)-max:
 print("Yes")
else:
 print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
L = [int(n) for n in input().split()]
maxL = max(L)
if maxL < sum(L) - maxL
	print("yes")
else:
	print("no")
Problem p03136 (python)

Fixed submission:
# the number of inputs
N = int(input())
# each length of edges
Ls= list(map(int, input().split()))

# searching largest one
largestL = 0
largestIndex = 0

# straightforward way
for i in range(N):
  if Ls[i] > largestL:
    largestL = Ls[i]
    largestIndex = i

sumOfSmallLs = 0
for i in range(N):
  if i != largestIndex:
    sumOfSmallLs += Ls[i]

if sumOfSmallLs > largestL:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
# the number of inputs
N = int(input())
# each length of edges
Ls= map(int(), input().split())
largestL = 0
largestIndex = 0
 
# straightforward way
for i in range(N):
  if Ls[i] > largestL:
    largestL = Ls[i]
    largestIndex = i
 
sumOfSmallLs = 0
for i in range(N):
  if i != largestIndex:
    sumOfSmallLs += Ls[i]
 
if sumOfSmallLs < largestL:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
# the number of inputs
N = int(input())
# each length of edges
Ls= map(int, input().split())
largestL = 0
largestIndex = 0

# straightforward way
for i in range(N):
  if Ls[i] > largestL:
    largestL = Ls[i]
    largestIndex = i

sumOfSmallLs = 0
for i in range(N):
  if i != largestIndex:
    sumOfSmallLs += Ls[i]

if sumOfSmallLs < largestL:
  print('Yes')
else:
  print('No')
Problem p03238 (python)

Fixed submission:
N = input()
if N == "1":
    print("Hello World")
elif N == "2":
    a = int(input())
    b =int(input())
    print(a+b)

Buggy submission (verdict: Runtime Error):
N = input()
if N == "1":
    print(""Hello Wolrd")
elif N == "2":
    a = int(input())
    b =int(input())
    print(a+b)
Problem p03261 (python)

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

if len(set(a)) != N:
    print("No")
    exit()

for i in range(1,N):
    if  a[i-1][-1] != a[i][0]:
        print("No")
        exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
a = [input() for i in range(N)]

if len(set(a)) != N:
    print("No")
    exit()

for i in range(1,N):
    if  a[i-1][-1] != a[i][0]:
        print("No")
        exit()
pront("Yes")
Problem p03457 (python)

Fixed submission:
N = int(input())
for i in range(N):
    t,x,y=map(int,input().split())
    if x+y>t or (t+x+y)%2 != 0:
        print("No")
        exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
for i in range(N):
    t,x,y=map(int,input()split())
    if x+y>t or (t+x+y)%2 != 0:
        print("No")
        break
 print("Yes")
Problem p04047 (python)

Fixed submission:
n = int(input())
table = list(map(int,input().split()))
table.sort()
count = 0
for i in range(2*n):
    if i%2 == 0:
        count += table[i]
    else:
        pass
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
table = list(map(int,input().split()))
table.sort()
count = 0
for i in range(n):
    if i%2 = 0:
        count += table[i]
    else:
        pass
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
table = list(map(int,input().split()))
table.sort()
count = 0
for i in range(1,n+1):
    if i%2 = 1:
        count += table[i]
    else:
        pass
print(count)
Problem p04033 (python)

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

if G>0 and B>0:
    print('Positive')

elif G<=0 and B>=0:
    print('Zero')

elif G < 0 and B < 0:
    if (B - G) % 2 == 0:
        print("Negative")
    else:
        print("Positive")

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

if G>0 and B>0:
    print('Positive')

elif G<=0 and B>=0:
    print('Zero')

elif a < 0 and b < 0:
    if (b - a) % 2 == 0:
        print("Negative")
    else:
        print("Positive")

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

if G*B <= 0:
  print('Zero')

elif G > 0:
  print('Positive')

elif (b - a) % 2 == 0:
  print('Negative')
Problem p03136 (python)

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

if max(L) < sum(L)-max(L):
    print("Yes")
else:
    print("No")

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

if max(L) < sum(L)-max(L):
    print("Yes")
else:
    print("No")
Problem p03323 (python)

Fixed submission:
A,B = map(int,input().split())
if A<9 and B<9:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
A,B = map(int,input())
if A<9 and B<9:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):

A = int(input())
B = int(input())

if A+B <= 16 and A < 9 and B < 9:
    print("Yay!")
else :
    print(":(")
Problem p03324 (python)

Fixed submission:
D, N = map(int,input().split())
if N == 100:
    N += 1
print(N * (100**D))

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

print(N * (100**D))
Problem p03607 (python)

Fixed submission:
X=0
hoge=1
N=int(input())
NUM_list = list(int(input()) for i in range(N))
NUM_list.sort()
for i in range(N-1):
   if NUM_list[i]==NUM_list[i+1]:
      hoge+=1
   else:
      X += hoge%2
      hoge=1
X+=hoge%2

print(X)

Buggy submission (verdict: Runtime Error):
N=int(input())
NUM_list = [0]*1000000000
X=0

for i in range(N):
   NUM_list[int(input())]+=1

for i in range(1000000000):
   X += NUM_list[i]%2

print(X)
Problem p03136 (python)

Fixed submission:
s1=input()
s2=input().split()
n2=[int(i) for i in s2]
a=sorted(n2,reverse=True)

max=a[0]
cnt=a[1:]
all=sum(cnt)

if(max<all):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s1=input()
s2=input().split()
a=sorted(s2,reverse=True)

max=int(a[0])
cnt=a[1:]
all=sum(int(i) for i in cnt)

if(max<all):
  print('Yes')
else
  print('No')

Buggy submission (verdict: Runtime Error):
s1=input()
s2=input().split()
a=sorted(s2,reverse=True)

max=a[0]
cnt=a[1:]
all=sum(int(i) for i in cnt)

if(max<all){
  print('Yes')
}else{
  print('No')
}
Problem p03228 (python)

Fixed submission:
a, b, k = map(int, input().split())
if k%2 == 0:
    for _ in range(int(k/2)):
        a = int(a/2)
        b += a
        b = int(b/2)
        a += b
    print(a ,b)
    
else:
    for _ in range(int(k/2)):
        a = int(a/2)
        b += a
        b = int(b/2)
        a += b
    a = int(a/2)
    b += a
    print(int(a),int(b))

Buggy submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
if k%2 == 0:
    for _ in range(int(k/2)):
        a = int(a/2)
        b += a
        b = int(b/2)
        a += b
    print(a ,b)
    
else:
    for _ in range((k-1/2)):
        a = int(a/2)
        b += a
        b = int(b/2)
        a += b
    a = int(a/2)
    b += a
    print(int(a),int(b))
Problem p03455 (python)

Fixed submission:
from sys import stdin

a,b = [int(x) for x in stdin.readline().rstrip().split()]

if a*b % 2 == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
from sys import stdin
a,b = stdin.readline().rstrip().split()
if a*b % 2 == 0:
  print("Even")
else:
  print("Odd")
Problem p03493 (python)

Fixed submission:
print(input().count("1"))

Buggy submission (verdict: Runtime Error):
from sys import stdin
s1, s2, s3 = [x for x in list(stdin.readline())]

Buggy submission (verdict: Runtime Error):
from sys import stdin
s1, s2, s3 = [x for x in list(stdin.readline())]
print(int(s1)+int(s2)+int(s3))

Buggy submission (verdict: Runtime Error):
from sys import stdin
[int(x) for x in list(stdin.readline())]

Buggy submission (verdict: Runtime Error):
from sys import stdin
[for x in list(stdin.readline())]

Buggy submission (verdict: Runtime Error):
from sys import stdin

[int(x) for x in list(stdin.readline())]

Buggy submission (verdict: Runtime Error):
from sys import stdin
[int(x) for x in list(stdin.readline())]

Buggy submission (verdict: Runtime Error):
from sys import stdin

s1, s2, s3 = [int(x) for x in list(stdin.readline())]

print(str(s1+s2+s3))

Buggy submission (verdict: Runtime Error):
from sys import stdin

s1, s2, s3 = [int(x) for x in list(stdin.readline())]

print(str(s1+s2+s3))

Buggy submission (verdict: Runtime Error):
from sys import stdin

s1, s2, s3 = [int(x) for x in list(stdin.readline())]

print(s1+s2+s3)

Buggy submission (verdict: Runtime Error):
from sys import stdin

s1, s2, s3 = [int(x) for x in list(stdin.readline())]

print(s1+s2+s3)
Problem p03145 (python)

Fixed submission:
a,b,c=map(int,input().split())
arr=sorted([a,b,c])
print(int(arr[0]*arr[1]/2))

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

td=sorted(td,key=lambda x:-x[1])

ans=0
eat=[]
noteat=[]
for t,d in td[:K]:
  ans+=d
  if t not in eat:
    eat.append(t)
  else:
    noteat.append(d)
temp_result=ans+len(eat)**2
max_result=temp_result

for t,d in td[K:]:
  if not noteat:
    break
  if t not in eat:
    temp_result+=2*len(eat)+1
    temp_result+=d-noteat.pop()
    eat.add(t)
    max_result=max(max_result,temp_result)
print(max_result)

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

td=sorted(td,key=lambda x:-x[1])

ans=0
eat=[]
noteat=[]
for t,d in td[:K]:
  ans+=d
  if t not in eat:
    eat.append(t)
  else:
    noteat.append(d)
temp_result=ans+sum(eat)**2
max_result=temp_result

for t,d in td[K:]:
  if not noteat:
    break
  if t not in eat:
    temp_result+=2*len(eat)+1
    temp_result+=d-noteat.pop()
    eat.add(t)
    max_result=max(max_result,temp_result)
print(max_result)

Buggy submission (verdict: Runtime Error):
a,b,c=input().split()
arr=sorted([a,b,c])
print(arr[0]*arr[1])
return arr[0]*arr[1]