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

Fixed submission:
# B - Bite Eating
# https://atcoder.jp/contests/abc131/tasks/abc131_b
"""
1~Nの数字がある
数列iの対応する値はL+i-1である

N = [1,2,3,4,5]
l = 1
対応する値=[2,3,4,5,6]

a = 対応する値の総和の絶対値を取得する
b = 1つだけ除外し、残った対応する値の総和の絶対値を取得する
aとbの差をなるべく小さくするには？
対応する値は負になることもある
"""

n, L = list(map(int, input().split()))

"""
L + i - 1の対応する値の配列を作成する 
"""
apple_taste = []
taste_total = 0
for i in range(1, n + 1):
    apple_taste.append(L + i - 1)
    taste_total += L + i - 1


"""
要素数が少ないので愚直に一つずつ除外していって差がより小さい箇所を探す
"""

abs_taste_total = abs(sum(apple_taste))
ans = 10 ** 9 # これを差の絶対値が少ないときに入れ替えるようにする
diff = 10 ** 9 # この子は差の絶対値を保持しておく

for i in apple_taste:
    current_total = taste_total - i # iを食べたときの合計値
    abs_current_total = abs(abs(taste_total) - abs(i)) # 現在の値の絶対値。マイナス同士で引くと右辺が正の数として扱われるので絶対値にする

    current_abs = abs(abs(abs_taste_total) - abs(current_total))
    if current_abs < diff:
        diff = current_abs
        ans = current_total

print(ans)

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

"""
L + i - 1の対応する値の配列を作成する 
"""
apple_taste = []
taste_total = 0
for i in range(1, n + 1):
    apple_taste.append(L + i - 1)
    taste_total += L + i - 1


"""
要素数が少ないので愚直に一つずつ除外していって差がより小さい箇所を探す
"""

abs_taste_total = abs(sum(apple_taste))
ans = 10 ** 9 # これを差の絶対値が少ないときに入れ替えるようにする

for i in apple_taste:
    current_total = taste_total - i # iを食べたときの合計値
    abs_current_total = abs(abs(taste_total) - abs(i)) # 現在の値の絶対値。マイナス同士で引くと右辺が正の数として扱われるので絶対値にする

    current_abs = abs(abs(abs_taste_total) - abs(current_total))
    if current_abs < diff:
        diff = current_abs
        ans = current_total

print(ans)

Buggy submission (verdict: Runtime Error):
# B - Bite Eating
# https://atcoder.jp/contests/abc131/tasks/abc131_b
"""
1~Nの数字がある
数列iの対応する値はL+i-1である

N = [1,2,3,4,5]
l = 1
対応する値=[2,3,4,5,6]

a = 対応する値の総和の絶対値を取得する
b = 1つだけ除外し、残った対応する値の総和の絶対値を取得する
aとbの差をなるべく小さくするには？
対応する値は負になることもある
"""

n, L = list(map(int, input().split()))

"""
L + i - 1の対応する値の配列を作成する 
"""
apple_taste = []
taste_total = 0
for i in range(1, n + 1):
    apple_taste.append(L + i - 1)
    taste_total += L + i - 1


"""
要素数が少ないので愚直に一つずつ除外していって差がより小さい箇所を探す
"""

abs_taste_total = abs(sum(apple_taste))
ans = 10 ** 9 # これを差の絶対値が少ないときに入れ替えるようにする

for i in apple_taste:
    current_total = taste_total - i # iを食べたときの合計値
    abs_current_total = abs(abs(taste_total) - abs(i)) # 現在の値の絶対値。マイナス同士で引くと右辺が正の数として扱われるので絶対値にする

    current_abs = abs(abs(abs_taste_total) - abs(current_total))
    if current_abs < diff:
        diff = current_abs
        ans = current_total

print(ans)
Problem p03035 (python)

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

if a <= 5:
    print(0)
elif a <= 12:
    print(b//2)
else:
    print(b)

Buggy submission (verdict: Runtime Error):
# D - Integer Cards
# https://atcoder.jp/contests/abc127/tasks/abc127_d

import sys

n, m = list(map(int, sys.stdin.readline().split()))
cards = list(map(int, sys.stdin.readline().split()))
cards.sort()

set = [list(map(int, sys.stdin.readline().split())) for _ in range(m)]

# combinations.sort(key = lambda x: x[1], reverse = True)
combinations = []
for b, c in set:
    combinations.extend([c] * b)

combinations.sort(reverse = True)

for i in range(len(combinations)):
    if i > len(cards) or combinations[i] <= cards[i]:
        break
    else:
        cards[i] = combinations[i]

print(sum(cards))
Problem p03076 (python)

Fixed submission:
# https://atcoder.jp/contests/abc123/tasks/abc123_b

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())


orders = [a, b, c, d, e]


def last_order(nums):
    cnt = 130
    num = 0

    for i in nums:
        if i % 10 != 0:
            if cnt > int(str(i)[-1]):
                cnt = int(str(i)[-1])
                num = i

    return num


def move_up(num):
    if num % 10 != 0:
        return  num + (10 - (num % 10))
    else:
        return num

last = last_order(orders)
if last:
    orders.remove(last)

total_time = 0

for i in orders:
    total_time = total_time + move_up(i)

print(total_time + last)

Buggy submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc123/tasks/abc123_b

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())


orders = [a, b, c, d, e]


def last_order(nums):
    cnt = 130
    num = 0

    for i in nums:
        if i % 10 != 0:
            if cnt > int(str(i)[-1]):
                cnt = int(str(i)[-1])
                num = i

    return num


def move_up(num):
    if num % 10 != 0:
        return  num + (10 - (num % 10))
    else:
        return num

last = last_order(orders)
orders.remove(last)

total_time = 0

for i in orders:
    total_time = total_time + move_up(i)

print(total_time + last)

Buggy submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc123/tasks/abc123_b

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())


orders = [a, b, c, d, e]


def last_order(nums):
    cnt = 130
    num = 130

    for i in nums:
        if i % 10 != 0:
            if cnt > int(str(i)[-1]):
                cnt = int(str(i)[-1])
                num = i

    return num


def move_up(num):
    if num % 10 != 0:
        return  num + (10 - (num % 10))
    else:
        return num

last = last_order(orders)
orders.remove(last)

total_time = 0

for i in orders:
    total_time = total_time + move_up(i)

print(total_time + last)
Problem p03285 (python)

Fixed submission:
n = int(input())
if n <= 3:
    print("No")
elif n == 5:
    print("No")
elif n == 6:
    print("No")
elif n == 9:
    print("No")
elif n == 10:
    print("No")
elif n == 13:
    print("No")
elif n == 17:
    print("No")    
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
n = int(input())
f = 4
s = 7

for i in range(n):
    for n in range(n):
        if s + f == n:
            ans = 1
            break

if ans:
    print("Yes")
else:
    print("No")
Problem p03448 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
nb = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if (x - 500*i - 100*j - 50*k) == 0:
        nb += 1
print(nb)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
x = int(input())
nb = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      (x - 500*i - 100*j - 50*k) == 0:
      nb += 1
print(nb)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, inpit().split())
if (a*b) % 2 == 0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a, b = map(int, imput().split())
if (a + b) % 2 == 0:
  print("Even")
else:
  print("Odd")
Problem p03470 (python)

Fixed submission:
n = int(input())
 
hoge = [0 for i in range(0,n)]
for i in range(0,n):
    hoge[i] = int(input())
    
 
number_set = set(hoge)
print(len(number_set))

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

hoge = [0 for i in range(0,N)]
for i in range(0,N):
    hoge[i] = int(input())
    

number_set = set(hoge)
print(len(number_set))
Problem p03478 (python)

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

sum_number = []

for i in range(x+1):
  if a <= sum(map(int, str(i))) <= b:
    sum_number += [i]
    
print(sum(sum_number))

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

sum_number = []

for i in range(x+1):
  if a <= sum(map(int, str(i))) <= b:
    sum_number += [i]
    
priny(sum(sum_number))

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

sum_number = []

for i in range(x+1):
  if a< sum(map(int, str(i))) < b:
    sum_number += [i]
    
priny(sum(sum_number))
Problem p03493 (python)

Fixed submission:
s = list(input())
numbers = 0
for i in s:
  if i ==  "1":
    numbers += 1

print(numbers)

Buggy submission (verdict: Runtime Error):
s = list(input())
numbers = 0
for i in s:
  if s[i] ==  "1":
    numbers += 1

print(numbers)

Buggy submission (verdict: Runtime Error):
s = list(input())
numbers = 0
for i in s:
  if s[i] == 1:
    numbers +=1

print(numbers)
Problem p03494 (python)

Fixed submission:
def how_many(n):
  ans = 0
  while n % 2 == 0:
    n /= 2
    ans += 1
  return ans
 
n = int(input())
li = map(int, input().split())

ans = min(map(how_many, li))

print(ans)

Buggy submission (verdict: Runtime Error):
li = map(int, input().split())
number = 0
even_or_odd = 1
def check_number(list):
  for i in list:
    if i % 2 == 0:
      continue
    else:
      even_or_odd *= 0
      
def cut_in_two(list):
  for i in list:
    i /= 2

while True:
  if even_or_odd == 1:
    check_number(li)
    cut_in_two(li)
    number += 1
  else:
    print(number)
    break
Problem p02778 (python)

Fixed submission:
S = input()
print("x"*len(S))

Buggy submission (verdict: Runtime Error):
S = input()
print("x"*len(words))
Problem p03145 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split();print(a*b//2)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input());print(a*b//2)
Problem p03156 (python)

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

li = [int(l) for l in lis]

judge = True

d = 0

li.sort()

while judge:
    if li == []:
        break
    
    s = []
    for n in li:
        if n <= b:
            s.append(n)
            li.remove(n)
            break
        else:judge = False

    for n in li:
        if n >= b+1 and n<=c:
            s.append(n)
            li.remove(n)
            break
        else:judge = False

    for n in li:
        if n>=c+1:
            s.append(n)
            li.remove(n)
            break
        else:
            judge= False

    if len(s) == 3:
        d+=1
        judge = True
    else:judge=False

print(d)

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

li = [int(l) for l in lis]

judge = True

d = 0

li.sort()

while judge:
    
    s = []
    s.append(min(li))
    li.remove(min(li))

    for n in li:
        if n >= b+1 and n<=c:
            s.append(n)
            li.remove(n)
            break
        else:judge = False

    for n in li:
        if n>=c+1:
            s.append(n)
            li.remove(n)
            break
        else:
            judge= False

    if len(s) == 3:
        d+=1
        judge = True
    else:judge=False

print(d)
Problem p03219 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
t,a = map(int,input().split())
lis = list(map(int,input().split()))
 
li = abs((t-lis[0]*0.006)-a)
l = 0
for i in range(1,n):
    if abs((t-lis[i]*0.006)-a) < li:
        li=abs((t-lis[i]*0.006)-a)
        l=i
print(l+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
lis=list(map(int,input().split()))
li=abs((t-lis[0]*0.006)-a)
l=0
for i in range(1,n):
    if abs((t-lis[i]*0.006)-a) < li:
        li=abs((t-lis[i]*0.006)-a)
        l=i
print(l+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
lis=list(map(int,input().split()))
li=abs((t-lis[0]*0.006)-a)
l=0
for i in range(1,n):
    if abs((t-lis[i]*0.006)-a) < li:
        li=abs((t-lis[i]*0.006)-a)
        l=i
print(l+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
lis=list(map(int,input().split()))
li=abs((t-lis[0]*0.006)-a)
l=0
for i in range(1,n):
    if abs((t-lis[i]*0.006)-a) < li:
        li=abs((t-lis[i]*0.006)-a)
        l=i
print(l+1)

Buggy submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
lis=list(map(int,input().split()))
li,l=abs((t-lis[0]*0.006)-a),0
for i in range(1,n):
    b = abs((t-lis[i]*0.006)-a)
    if b < li:
        li=b
        l=i
print(l+1)

Buggy submission (verdict: Runtime Error):
n=int(input());t,a=map(int,input().split())
lis=list(map(int,input().split()))
li,l=abs((t-lis[0]*0.006)-a),0
for i in range(1,n):
    b = abs((t-lis[i]*0.006)-a)
    if b < li:
        li=b
        l=i
print(l+1)

Buggy submission (verdict: Runtime Error):
n=int(input());t,a=map(int,input().split())
lis=list(map(int,input().split()));li,l=abs((t-lis[0]*0.006)-a),0
for i in range(1,n):if abs((t-lis[i]*0.006)-a) < li:li,l=abs((t-lis[i]*0.006)-a),i
print(l+1)
Problem p03220 (python)

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

li = abs((t-lis[0]*0.006)-a)
l = 0
for i in range(1,n):
    if abs((t-lis[i]*0.006)-a) < li:
        li=abs((t-lis[i]*0.006)-a)
        l=i
print(l+1)

Buggy submission (verdict: Runtime Error):
n=int(input());t,a=map(int,input().split())
lis=list(map(int,input().split()));li,l=abs((t-lis[0]*0.006)-a),0
for i in range(1,n):if abs((t-lis[i]*0.006)-a) < li:li,l=abs((t-lis[i]*0.006)-a),i
print(l+1)
Problem p03227 (python)

Fixed submission:
a = input();print("".join(reversed(a)) if len(a) == 3 else a)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split());lis=[a,b]
for i in range(c):
    if lis[i%2]%2==1:lis[i%2]-=1
    lis[(i+1)%2]+=lis[i%2]/2;lis[i%2]/=2
print(int(lis[0]),int(lis[1]))
Problem p03323 (python)

Fixed submission:
num = input()

num = num.split(" ")

for i in range(len(num)-1):
    if int(num[i]) <= 8 and int(num[i+1]) <= 8:
        print("Yay!")

    else:
        print(":(")

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

if a > 8 or b > 8:
    print(":(")



else:
    print("Yay!")

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

if a > 8:
    print(":(")

elif b > 8:
    print(":(")

else:
    print("Yay!")
Problem p03337 (python)

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


for num in range(len(lis)-1):
    add = int(lis[num]) + int(lis[num+1])
    pull = int(lis[num]) - int(lis[num+1])
    product = int(lis[num]) * int(lis[num+1])


mostbig = max([add,pull,product])
print(mostbig)

Buggy submission (verdict: Runtime Error):
s,t = map(int,input().split());print(max( for i in range(3))
Problem p03359 (python)

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

if a < b:
    print(a)

elif a > b:
    a = a - 1
    print(a)

elif a == b:
    print(a)

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


lis = [A,B,C]
max_num = max(A,B,C)

lis.remove(max_num)

rui = 2 ** k

nibai = max_num * rui


a = lis[0]
b = lis[1]
print(a + b + nibai)

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


lis = [A,B,C]
max_num = max(A,B,C)

lis.remove(max_num)

rui = 2 ** k

nibai = max_num * rui


a = lis[0]
b = lis[1]
print(a + b + nibai)

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

lis = [A,B,C]
max_num = max(A,B,C)

lis.remove(max_num)

nibai = max_num * 2

nibai = nibai*k

a = lis[0]
b = lis[1]
print(a + b + nibai)

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

if a < b:
    print(a,"日")

elif a > b:
    a = a - 1
    print(a,"日")

elif a == b:
    print(a,"日")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
j = 0
if a == b:
    print("高橋は",a,"日")
Problem p03455 (python)

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

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

seki = a*b

if seki % 2 == 0:
    print("Even")

elif seki % 2 ==1:
    print("Odd")

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

seki = a*b

if seki % 2 == 0:
    print("Even")

elif seki % 2 ==1:
    print("Odd")

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

if seki % 2 == 0:
    print("Even")

elif seki % 2 == 1:
  	print("Odd")

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

seki = a*b

if seki % 2 == 0:
    print("Even")

elif seki % 2 == 1:
  	print("Odd")

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

seki = a*b

if seki % 2 == 0:
    print("Even")

elif seki % 2 == 1:
  	print("Odd")
Problem p03485 (python)

Fixed submission:
num,numsecond = map(int,input().split())
number = num + numsecond
answer = number // 2
if number / 2 - number //2 > 0:
    answer += 1

print(answer)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
print((a+b))//2 if (a+b) % 2 == 0 else (a+b)//2+1))
Problem p03501 (python)

Fixed submission:
money,time,allmoney = map(int,input().split())
product = money * time
print(product if product < allmoney else allmoney)

Buggy submission (verdict: Runtime Error):
a=input()
print("Yes"if int(a)%sum([int(a[i]) for i in range(len(a))])==0 else "No")
Problem p03502 (python)

Fixed submission:
a= input()
print("Yes" if int(a) % sum([int(a[i]) for i in range(len(a))]) == 0 else "No")

Buggy submission (verdict: Runtime Error):
a= input()
print("Yes" if int(a) % (int(a[0])+int(a[1])) == 0 else "No")
Problem p03635 (python)

Fixed submission:
numone,numtwo = map(int,input().split())
answer = (numone -1) * (numtwo -1)
print(answer)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
print((a-1)*(b-1) if (a-1)*(b-1) >= 4)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input())
print((a-1)*(b-1) if (a-1)*(b-1) >= 4 else 0)
Problem p03826 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
print(a*b if a*b > c*d else c*d)

Buggy submission (verdict: Runtime Error):
a,b = int(input()),input()
j,l=0,[0]
for i in b:
	if i == "I":
		j+=1
	else:
		j-=1
	l.append(j)
print(max(l))

Buggy submission (verdict: Runtime Error):
a,b = int(input()),input()
j,l=0,[0]
for i in b:
	if i == "I":j+=1
	else:j-=1
	l.append(j)
print(max(l))
Problem p03997 (python)

Fixed submission:
lis = [int(input()) for i in range(3)]
print((lis[0]+lis[1]) * lis[2] // 2)

Buggy submission (verdict: Runtime Error):
upperbase,bottom,high = map(int,input().split())
print((upperbase + bottom) * high /　2)

Buggy submission (verdict: Runtime Error):
upperbase,bottom,high = map(int,input().split())
print((upperbase + bottom) * high /　2)

Buggy submission (verdict: Runtime Error):
upperbase,bottom,high = map(int,input().split())
print((upperbase + bottom) * high // 2)
Problem p04033 (python)

Fixed submission:
A, B = map(int, input().split())
if A > 0:
    print("Positive")
elif A <= 0 <= B:
    print("Zero")
else:
    print("Positive" if (B-A+1)%2== 0 else "Negative")

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
if A > 0 and B > 0:
    print("Positive")
elif A <= 0 <= B:
    pritn("Zero")
else:
    print("Positive" if (A-B)%2== 0 else "Negative")
Problem p04044 (python)

Fixed submission:
num,lengh = map(int,input().split())
lis = [input() for i in range(num)]
print("".join(sorted(lis)))

Buggy submission (verdict: Runtime Error):
lengh,num = map(int,input().split())
lis = [input() for i in range(num)]
print("".join(sorted(lis)))
Problem p03309 (python)

Fixed submission:
from statistics import median
N = int(input())
a = list(map(int, input().split()))
for i in range(N):
    a[i] = a[i] - (i + 1)
b = int(median(a))
for i in range(N):
    a[i] = abs(a[i] - b)
print(sum(a))

Buggy submission (verdict: Runtime Error):
from statistics import mode
N = int(input())
a = list(map(int, input().split()))
for i in range(N):
    a[i] = a[i] - (i + 1)
if len(a) == len(set(a)):
    b = 0
else:
    b = mode(a)
for i in range(N):
    a[i] = abs(a[i] - b)
print(sum(a))
Problem p03337 (python)

Fixed submission:
a, b = map(int, input().split())
calcs = [a + b, a - b, a * b]
print(max(calcs))

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

reS = S[::-1]

wSum = [0 for i in range(N)]
eSum = [0 for i in range(N)]

for i in range(N):
    if i == 0:
        if S[i] == 'W':
            wSum[i] = 1
        if reS[i] == 'E':
            eSum[i] = 1
    else:
        if S[i] == 'W':
            wSum[i] = wSum[i-1] + 1
        else:
            wSum[i] = wSum[i-1]
        if reS[i] == 'E':
            eSum[i] = eSum[i-1] + 1
        else:
            eSum[i] = eSum[i-1]

eSum = eSum[::-1]

cost = eSum[1]

for i in range(1,N):
    if i == N - 1:
        if cost > wSum[N-2]:
            cost = wSum[N-2]
    else:
        if cost > wSum[i-1] + eSum[i+1]:
            cost = wSum[i-1] + eSum[i+1]
print(cost)

Buggy submission (verdict: Runtime Error):
n=int(input());s=input();print(max(len(set(s[:i])&set(s[i:]))for i in range(n)))

Buggy submission (verdict: Runtime Error):
n=int(input());s=input();print(max(len(set(s[:i])&set(s[i:]))for i in range(n)))

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

x = 0

for i in range(len(s)):
  a = s[0:i]
  b = s[i:]
  
  x = max(x, len(set(a) & set(b)))

print(x)

Buggy submission (verdict: Runtime Error):
input()
s = input()
x = 0
for i in range(len(s)):
    a = s[:i]
    b = s[i:]
    x = max(x, len(set(a) & set(b)))

print(x)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
x = 0
for i in range(n):
    a = s[0:i]
    b = s[i:]
    x = max(x, len(set(a) & set(b)))

print(x)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(input())
x = 0
for i in range(n):
    a = s[0:i]
    b = s[i:]
    x = max(x, len(set(a) & set(b)))

print(x)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(input())
x = 0
for i in range(n):
    a = s[:i]
    b = s[i:]
    x = max(x, len(set(a) & set(b)))

print(x)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(input())
x = 0
for i in range(n):
    a = s[:i]
    b = s[i:]
    temp_set = set(a) & set(b)
    x = max(x, len(temp_set))

print(x)
Problem p03359 (python)

Fixed submission:
m,d = map(int, input().split())
if (m <= d):
    print(m)
else:
    print(m-1)

Buggy submission (verdict: Runtime Error):
ABC = list(map(int,input().split()))
K = int(input())
print(max(ABC) * 2**K + sum(ABC) - max(ABC))
Problem p02783 (python)

Fixed submission:
#入力
H, A = map(int, input().split())

#出力
s = 1
counter = 1
while counter>0:
    if H - A >0:
        H = H - A
        s = s + 1
        counter = counter
    else:
        H = H - A
        s = s
        counter = counter - 1
        print(s)

Buggy submission (verdict: Runtime Error):
import numpy as np
#入力
N, K = map(int, input().split())
li = list(map(int,input().split()))
list.sort(li, reverse = True)

#出力
a = list(np.zeros(K))
b = list(np.ones(N-K))
a.extend(b)

print(np.dot(a, li))

Buggy submission (verdict: Runtime Error):
import numpy as np
#入力
N, K = map(int, input().split())
li = list(map(int,input().split()))
list.sort(li, reverse = True)

#出力
a = list(np.zeros(K))
b = list(np.ones(N-K))
a.extend(b)

print(np.dot(a, li))
Problem p02801 (python)

Fixed submission:
C = str(input())

print(chr(ord(C)+1))

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

print(chr(ord('s')+1))