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

Fixed submission:
a, b = map(int, input().split())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Buggy submission (verdict: Runtime Error):
a, b = map(int(), input())
x = 0
for i in range(b - a):
    x += x + i
    print(x - a)

Buggy submission (verdict: Runtime Error):
a, b = map(int(),  input())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
print(( c * (c - 1) //2 + c - b))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
d =int( c * (c - 1) // 2 + c  -b)
print(d)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
d =int( c * (c - 1) /2 + c  -b)
print(d)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
d = c * (c -1) 
p = d // 2
e = int(c -1)
f = int(1 + p + e)
print(int(f - b))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
d = c * (c -1) 
p = d / 2
e = int(c -1)
f = int(1 + p + e)
print(int(f - b))

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(b - a)
d = c * (c -1) / 2
e = int(c -1)
f = int(1 + d + e)
print(int(f - b))
Problem p03331 (python)

Fixed submission:
if __name__ == '__main__':
    n = int(input())
    ans = 99999999
    for i in range(1, n):
        total = list(str(n-i)) + list(str(i))
        tmp = 0
        for t in total:
            tmp += int(t)
        ans = min(ans, tmp)
    print(ans)

Buggy submission (verdict: Runtime Error):
import itertools


if __name__ == '__main__':
    N, A, B, K = map(int, input().split())
    li = [i for i in range(N)]
    ans = 0
    for ai in range(N):
        tmp = K-(ai*A)
        if tmp / B <= N and tmp % B == 0:
            bi = tmp // B
            a = len(list(itertools.combinations(li, ai)))
            b = len(list(itertools.combinations(li, bi)))
            ans += a*b
    print(ans)
Problem p03434 (python)

Fixed submission:
if __name__ == '__main__':
    n = int(input())
    cardlist = list(map(int, input().split()))
    cardlist.sort()

    alice_s, bob_s = 0, 0
    while cardlist != []:
        alice_s += cardlist.pop()
        if cardlist == []:
            break
        bob_s += cardlist.pop()
    ans = alice_s - bob_s
    print(ans)

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    n = int(input())
    cardlist = list(map(int, input().split()))
    cardlist.sort()

    alice_s, bob_s = 0, 0
    while cardlist != []:
        alice_s += cardlist.pop()
        bob_s += cardlist.pop()
    ans = alice_s - bob_s
    print(ans)
Problem p03471 (python)

Fixed submission:
if __name__ == '__main__':
    one_thousand, five_thousand, ten_thousand = 1000, 5000, 10000
    n, y = map(int, input().split())
    ans = []
    for i in range(0, n+1):
        for j in range(0, n+1-i):
            k = n - (i + j)
            one = one_thousand * i
            five = five_thousand * j
            ten = ten_thousand * k
            sum_price = one + five + ten
            if k >= 0 and n == i + j + k and sum_price == y:
                ans.append([k, j, i])
                break
        if ans != []:
            print(ans[0][0], ans[0][1], ans[0][2])
            break
    if ans == []:
        print(-1, -1, -1)

Buggy submission (verdict: Runtime Error):
n, y = map(int, input().split())
for i in range(0, n+1):
  for j in range(0, n+1-i):
	k = n - (i + j)
	sum_price = 10000*i + 5000*j + 1000*k
	if n == i + j + k and sum_price == y:
		print(i, j, k)
		exit()
print(-1, -1, -1)

Buggy submission (verdict: Runtime Error):
n, y = map(int, input().split())
for i in range(0, n+1):
	for j in range(0, n+1-i):
        k = n - (i + j)
        sum_price = 10000*i + 5000*j + 1000*k
        if n == i + j + k and sum_price == y:
            print(i, j, k)
            exit()
print(-1, -1, -1)
Problem p03386 (python)

Fixed submission:
# -*- coding: utf-8 -*-

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

l,r = A+K-1,B-K+1

if l >= r:
  first = list(range(A, r))
else:
  first = list(range(A, l+1))
last  = list(filter(lambda n: n>=A, range(r, B+1)))

for n in (first + last):
  print(n)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

ns = list(range(A, B+1))
first =  ns[:K]
last  = ns[-K:]

u = list(set().union(first, last))

for n in u:
  print(n)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

ns = list(range(A, B+1))
first =  ns[:K]
last  = ns[-K:]

for n in first + last:
  print(n)
Problem p03471 (python)

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

for sen in range(0, N+1):
  for gosen in range(0, N+1):
    man = N - sen - gosen
    if man < 0: break
    if 10000*man + 5000*gosen + 1000*sen == Y:
      print("{} {} {}".format(man, gosen, sen))
      exit(0)

print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N,Y = map(int, input().split())
if Y % 1000 != 0:
  print("-1 -1 -1")
  exit(1)

for sen in range(0, N+1):
  for gosen in range(0, N+1):
    if sen+gosen > N:
      print("-1 -1 -1")
      exit(1)
    man = N - sen - gosen
    if 10000*man + 5000*gosen + 1000*sen == Y:
      print("{} {} {}".format(man, gosen, sen))
      exit(1)
Problem p03633 (python)

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

from functools import reduce
import math

# GCD and LCM are not in math module.  They are in gmpy, but these are simple enough:

def gcd(a,b):
    """Compute the greatest common divisor of a and b"""
    while b > 0:
        a, b = b, a % b
    return a
    
def lcm(a, b):
    """Compute the lowest common multiple of a and b"""
    return a * b // gcd(a, b)

N = int(input())
ts = []
for _ in range(N):
  T = int(input())
  ts.append(T)

# print(reduce(lcm, ts))
ans = 1
for i in range(N):
  ans = lcm(ans, ts[i])
print(ans)

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

from functools import reduce
import math

# GCD and LCM are not in math module.  They are in gmpy, but these are simple enough:

# def gcd(a,b):
#     """Compute the greatest common divisor of a and b"""
#     while b > 0:
#         a, b = b, a % b
#     return a
    
def lcm(a, b):
    """Compute the lowest common multiple of a and b"""
    return a * b // math.gcd(a, b)

N = int(input())
ts = []
for _ in range(N):
  T = int(input())
  ts.append(T)

# print(reduce(lcm, ts))
ans = 1
for i in range(N):
  ans = lcm(ans, ts[i])
print(ans)

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

from functools import reduce
import math

# GCD and LCM are not in math module.  They are in gmpy, but these are simple enough:

# def gcd(a,b):
#     """Compute the greatest common divisor of a and b"""
#     while b > 0:
#         a, b = b, a % b
#     return a
    
def lcm(a, b):
    """Compute the lowest common multiple of a and b"""
    return a * b // math.gcd(a, b)

N = int(input())
ts = []
for _ in range(N):
  T = int(input())
  ts.append(T)

print(reduce(lcm, ts))

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

from functools import reduce
import math

# GCD and LCM are not in math module.  They are in gmpy, but these are simple enough:

# def gcd(a,b):
#     """Compute the greatest common divisor of a and b"""
#     while b > 0:
#         a, b = b, a % b
#     return a
    
def lcm(a, b):
    """Compute the lowest common multiple of a and b"""
    return a * b / math.gcd(a, b)

N = int(input())
ts = []
for _ in range(N):
  T = int(input())
  ts.append(T)

print(int(reduce(lcm, ts)))

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

from functools import reduce

# GCD and LCM are not in math module.  They are in gmpy, but these are simple enough:

def gcd(a,b):
    """Compute the greatest common divisor of a and b"""
    while b > 0:
        a, b = b, a % b
    return a
    
def lcm(a, b):
    """Compute the lowest common multiple of a and b"""
    return a * b / gcd(a, b)

N = int(input())
ts = []
for _ in range(N):
  T = int(input())
  ts.append(T)

print(int(reduce(lcm, ts)))
Problem p03359 (python)

Fixed submission:
a, b = (int(i) for i in input().split())

if b < a:
    ans = a - 1
else:
    ans = a

print(ans)

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

testA = 0
if testA < a:
    testA = a
if testA < b:
    testA = b
if testA < c:
    testA = c
  
ans = a + b + c + testA * (K-1)
print(ans)
Problem p03323 (python)

Fixed submission:
number = input()
a = number.split()

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

if A < 9 and B < 9:
    print("Yay!")
else:
    print(":(")

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

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = maxnum/2
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)
Problem p03324 (python)

Fixed submission:
number = input()
a = number.split()

D=int(a[0])
N=int(a[1])

if N == 100:
    if D==0:
        print(N+1)
    elif D==1:
        answer = 100*N
        print(answer+100)
    elif D==2:
        answer = 10000*N
        print(answer+10000)

else:
    if D==0:
        print(N)
    elif D==1:
        answer = 100*N
        print(answer)
    elif D==2:
        answer = 10000*N
        print(answer)

Buggy submission (verdict: Runtime Error):
number = input()
a = number.split()

D=int(a[0])
N=int(a[1])

if D=0:
    print(N)
elif D=1:
    answer = 100*N
    print(answer)
elif D=2:
    answer = 10000*N
    print(answer)
Problem p03325 (python)

Fixed submission:
from math import log2

N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = log2(maxnum)
    maxnum = int(maxnum)
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)

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

N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = log2(maxnum)
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)

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

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = maxnum/2
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)
Problem p03308 (python)

Fixed submission:
def main():
    N = int(input())
    A = []
    data = input().split()
    for i in range(N):
        A.append(int(data[i]))
    
    A.sort()
    print(A[N - 1] - A[0])
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    A = []
    for i in range(N):
        A.append(int(input()))
    
    A.sort()
    print(A[N - 1] - A[0])
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    A = []
    for i in range(N):
        A.append(int(input()))
    
    A.sort()
    print(A[n - 1] - A[0])
    
if __name__ == "__main__":
    main()
Problem p03309 (python)

Fixed submission:
def main():
    N = int(input())
    A = []
    data = input().split()
    for i in range(N):
        A.append(int(data[i]))
    C = [A[i] - i - 1 for i in range(N)]
    C.sort()
    m = N // 2
    x = C[m]
    left = sum([x - C[i] for i in range(m)])
    right = sum([C[i] - x for i in range(m + 1, N)])
    print(left + right)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    A = []
    for i in range(N):
        A.append(int(input()))
    C = [A[i] - i - 1 for i in range(N)]
    C.sort()
    m = N // 2
    x = C[m]
    left = sum([x - C[i] for i in range(m)])
    right = sum([C[i] - x for i in range(m + 1, N)])
    print(left + right)
    
if __name__ == "__main__":
    main()
Problem p03323 (python)

Fixed submission:
def main():
    A, B = map(int, input().split())
    if A > 8 or B > 8:
        print(":(")
    else:
        print("Yay!")

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
# coding: utf-8
def main():
    A = int(input())
    B = int(input())
    if A > 8 or B > 8:
        print(":(")
    else:
        print("Yay!")

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

Fixed submission:
a, b = map(int, input().split())
if a <= 8 and b <= 8:
	print("Yay!")
else:
	print(":(")

Buggy submission (verdict: Runtime Error):
    d, n = map(int, input().split())
    if d == 0:
      if n == 100:
        print(101)
      else:
        print(n)
    else:
      if n == 100:
      	print(100**d * n)
      else:
        print(100**d * 101)
Problem p03361 (python)

Fixed submission:
H, W = [int(_) for _ in input().split()]
S = [input() for _ in range(H)]

def solve(H, W, S):
    S = [s + "." for s in S] + ["." * (W + 1)]
    for y in range(H):
        for x in range(W):
            if (S[y][x] == "#" and
                S[y][x + 1] == "." and S[y][x - 1] == "." and
                S[y + 1][x] == "." and S[y - 1][x] == "."
            ):
                return False
    return True

if solve(H, W, S):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
H, W = [int(_) for _ in input().split()]
S = [input() for _ in range(H)]

def solve(H, W, S):
    S = [s + "." for s in S] + ["." * (W + 1)]
    for y in range(H):
        for x in range(H):
            if (S[y][x] == "#" and
                S[y][x + 1] == "." and S[y][x - 1] == "." and
                S[y + 1][x] == "." and S[y - 1][x] == "."
            ):
                return False
    return True

if solve(H, W, S):
    print("Yes")
else:
    print("No")
Problem p03409 (python)

Fixed submission:
N = int(input())
AB = [tuple(int(_) for _ in input().split()) for i in range(N)]
CD = [tuple(int(_) for _ in input().split()) for i in range(N)]

AB.sort(key=lambda xy:xy[1], reverse=True)
CD.sort()
for c, d in CD:
    for a, b in AB:
        if a < c and b < d:
            AB.remove((a, b))
            break

print(N - len(AB))

Buggy submission (verdict: Runtime Error):
# http://nobuta05.hatenablog.com/entry/2015/11/12/013938

def get_edge(M, u, U=None):

    if U == None:
        for x in M[:]:
            if x[0] == u:
                return x[1]
            elif x[1] == u:
                return x[0]

    else:
        for x in M[:]:
            if x[0] == u and x[1] in U:
                return x[1]
            elif x[1] == u and x[0] in U:
                return x[0]
    return None

def get_nodes(M):
    U = set()
    V = set()
    for x in M:
        U.add(x[0])
        V.add(x[1])
    return (U, V)


def augpath(Si, Ti, M, E):
    (U, V) = get_nodes(M)
    Ti1 = set(x[1] for x in E if x[0] in Si and not x[1] in Ti)
    
    if Ti1 == set():
        return (M, None)

    elif Ti1.difference(V) == set():
        Si1 = set(x[0] for x in M if x[1] in Ti1)
        (M, ui1) = augpath(Si1, Ti.union(Ti1), M, E)

        if ui1 == None:
            return (M, None)

        else:
            v = get_edge(M, ui1)
            M.remove((ui1,v))

            ui = get_edge(E, v, U=Si)
            M.append((ui,v))
            
            return (M, ui)

    else:
        v = Ti1.difference(V).pop()
        u = get_edge(E, v, U=Si)
        M.append((u,v))

        return (M, u)
    

def Hungary(U0, V0, E):
    U_bef = set()
    M = []
    cnt = 0
    length = len(U0)
    
    # CALC
    while True:

        # INIT
        (U, V) = get_nodes(M)
        u = U0[cnt%length]
        cnt = cnt + 1
        S0 = set()
        S0.add(u)
        T0 = set()

        # 終了条件(すべての頂点から始まる増大道を調べて、マッチング数が変わっていなければ、それ以上増えることはない)
        if cnt % length == 0:
            if U.difference(U_bef) == set():
                break
            U_bef = U.copy()

        # 枝刈り(すでにマッチングしている頂点から始まる道は増大道ではない)
        if u in U:
            continue
        
        #CALC
        (M, u) = augpath(S0, T0, M, E)
    
    return M


N = int(input())
AB = [[int(_) for _ in input().split()] for i in range(N)]
CD = [[int(_) for _ in input().split()] for i in range(N)]

E = []

for i in range(N):
    for j in range(N):
        if AB[i][0] < CD[j][0] and AB[i][1] < CD[j][1]:
            E.append((i, j))

M = Hungary(range(N), range(N), E)
print(len(M))
Problem p03470 (python)

Fixed submission:
import os
import sys


n = input()
a = []
for i in range(int(n)):
    a.append(input())

print(len(set(a)))

Buggy submission (verdict: Runtime Error):
import os
import sys


n = input()
a = []
for i in range(n):
    a.append(input())

print(len(set(a)))
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = input().split()
if (a*b)%2==1:
    print("Odd")
else:
    print("Even")

Buggy submission (verdict: Runtime Error):
a,b = input().split()
if a*b%2==1:
    print("Odd")
else:
    print("Even")
Problem p03469 (python)

Fixed submission:
s = input()
print(s.replace("2017","2018"))

Buggy submission (verdict: Runtime Error):
s = input()
s[3]="8"
print(s)
Problem p03471 (python)

Fixed submission:
n,Y = map(int,(input().split()))
x = 0
y = 0
z = 0
f = True
for i in range(n+1):
    for j in range(n+1):
        k=Y-i*10000-j*5000
        if k==(n-i-j)*1000 and k>=0:
            x=i
            y=j
            z=int(k/1000)
            f=False
if f :
    x = -1
    y = -1
    z = -1
print(x,y,z)

Buggy submission (verdict: Runtime Error):
n,y = map(int,(input()))
x,y,z = map(int,"-1"*3)
for i in range(n+1):
    for j in range(n+1):
        z=y-i*10000-j*5000
        if z==(n-i-j):
            x=i
            y=j
            z=n-i-j
print(x,y,z)
Problem p03493 (python)

Fixed submission:
n = input()
ans = 0
for i in range(len(n)):
    ans += int(n[i])
print(ans)

Buggy submission (verdict: Runtime Error):
n = "".join(map(int,input().split()))
print(sum(n))
Problem p03693 (python)

Fixed submission:
a = [int(i) for i in input().split()]
a = a[0]*100 + a[1]*10 + a[2]
if a%4 == 0:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
a = map(int,input().split())
a = a[0]*100 + a[1]*10 + a[2]
if a%4 == 0:
    print("YES")
else:
    print("NO")
Problem p04001 (python)

Fixed submission:
n = list(input())
ans = 0
for i in range(2**(len(n)-1)):
    plus = [""]*(len(n))
    fomula = ""
    for j in range(len(n)-1):
        if(i>>j & 1):
            plus[j] = "+"
    for i in range(len(n)):
        fomula += n[i] + plus[i]
    ans += eval(fomula)
print(ans)

Buggy submission (verdict: Runtime Error):
aqqn = list(input())
ans = 0
for i in range(2**(len(n)-1)):
    plus = [""]*(len(n))
    fomula = ""
    for j in range(len(n)-1):
        if(i>>j & 1):
            plus[j] = "+"
    for i in range(len(n)):
        fomula += n[i] + plus[i]
    ans += eval(fomula)
print(ans)
Problem p03477 (python)

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 submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if a+b > c+d:
    pirnt('Left')
elif a+b == c+d :
    print('Balanced')
else :
    print('Right')

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if a+b > c+d:
    pirnt('Left')
elif a+b == c+d :
    print('Balanced')
elif a+b < c+d :
    print('Right')
Problem p03338 (python)

Fixed submission:
# 入力の受け取り
n = int(input())
s = input()

# 全種類用意しとく
alphabets_list = [c for c in "abcdefghijklmnopqrstuvwxyz"]

# 判定
result = []
for i in range(1, n):
    x = s[ :i]
    y = s[i: ]
    count = 0
    for alphabet in alphabets_list:
        if (alphabet in x) and (alphabet in y):
            count += 1
        else:
            count += 0
    result.append(count)

print(max(result))

Buggy submission (verdict: Runtime Error):
# 入力の受け取り
n = int(input())
list = list(input().split())

# 全種類用意しとく
alphabets_list = lsit("abcdefghijklmnopqrstuvwxyz".split())

# 判定
for i in range(1, n - 1):
    x = list[ :i]
    y = list[i: ]
    count = 0
    for alphabet in alphabets_list:
        if alphabet in x and alphabet in y:
            count += 1
        else:
            continue

print(continue)
Problem p03308 (python)

Fixed submission:
N = int(input())
Nlist = input().split()

wMax = int(Nlist[0])
wMin = int(Nlist[0])
for value in Nlist:
    if int(value) > wMax:
        wMax = int(value)
    if int(value) < wMin:
        wMin = int(value)

print(abs(wMax - wMin))

Buggy submission (verdict: Runtime Error):
N = int(input())
Nlist = input().split()

wMax = Nlist(0)
wMin = Nlist(0)
for value in Nlist:
    if int(value) > wMax:
        wMax = int(value)
    if int(value) < wMin:
        wMin = int(value)

print(abs(wMax - wMin))
Problem p03485 (python)

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

print(int((a + b) / 2 + 0.9))

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

print(int((a + b) / 2　+ 0.9))

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

print(int(((a + b) / 2　+ 0.9)))

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

print(int(((a + b) / 2　+ 0.5)))
Problem p03486 (python)

Fixed submission:
a = input()
b = input()

c = ''.join(sorted(a))
d = ''.join(sorted(b, reverse=True))

if c < d:
  print("Yes")
else:
  print("No")

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

c = a.sort()
d = b.sort()

if c < d:
  print("Yes")
else:
  print("No")
Problem p03493 (python)

Fixed submission:
a = input()
b = int(a[0:1])
c = int(a[1:2])
d = int(a[2:3])

ball = 0

if(b == 1):
  ball += 1

if(c == 1):
  ball += 1

if(d == 1):
  ball += 1
  
print(ball)

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

count = 0

if a[1:2] = "1":
  count += 1

if a[2:3] = "1":
  count += 1

if a[3:4] = "1":
  count += 1

print(count)

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

b = int(a[0:1])
c = int(a[1:1])
d = int(a[2:1])

ball = 0

if(b == 1):
  ball += 1

if(c == 1):
  ball += 1

if(d == 1):
  ball += 1
  
print(ball)

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

b = int(a[0:0])
c = int(a[1:0])
d = int(a[2:0])

ball = 0

if(b == 1):
  ball += 1

if(c == 1):
  ball += 1

if(d == 1):
  ball += 1
  
print(ball)
Problem p03693 (python)

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

Number = r * 100 + g *10 + b

if (Number % 4) == 0:
  print("YES")
else:
  print("NO")

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

Number = r * 100 + g *10 + b

if (Number % 4) == 0:
  print("YES")
else:
  print("NO")

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

Number = r * 100 + g *10 + b

if (Number % 4) == 0:
  print("YES")
else:
  print("NO")
Problem p03386 (python)

Fixed submission:
A, B, K = map(int, input().split())
arr = range(A, B + 1)
ans = []
for i in range(K):
    ans.append(A + i)
for j in range(K):
    ans.append(B + 1 - K + j)

anset = list(set(ans))
anset.sort()
if A+K<=B+1:
    for ele in range(len(anset)):
        print(anset[ele])
else:
    for ele in range(A,B+1):
        print(ele)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
arr = range(A, B + 1)
ans = []
for i in range(K):
    ans[i] = arr[A + i]
for j in range(K):
    ans[j + K + 2] = arr[B + 1 - K + j]
print(set(ans))