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

Fixed submission:
n = int(input().strip()) % 10
if n in (2, 4, 5, 7, 9):
    print("hon")
elif n in (0, 1, 6, 8):
    print("pon")
else:
  	print("bon")

Buggy submission (verdict: Runtime Error):
n = input() % 10
if n in ("2", "4", "5", "7", "9"):
    print("hon")
elif n in ("0", "1", "6", "8"):
    print("pon")
else:
  	print("bon")
Problem p02724 (python)

Fixed submission:
coin_values = [[500, 1000], [5, 5]]
result = 0
x = int(input().strip())
idx = 0
for coin, value in coin_values:
    result += value * (x // coin)
    x = x - x // coin * coin
  
print(result)

Buggy submission (verdict: Runtime Error):
coin_value = [[500, 1000], [5, 5]]
result = 0
x = int(input().strip())
idx = 0
for coin, value in coin_values:
  result += value * (x // coin)
  x = x - x // coin * coin
  
print(result)

Buggy submission (verdict: Runtime Error):
coin_value = [[500, 1000], [5, 5]]
result = 0
x = int(input().strip())
idx = 0
for coin, value in coin_values:
    result += value * (x // coin)
    x = x - x // coin * coin
  
print(result)
Problem p02640 (python)

Fixed submission:
X, Y = map(int, input().split())

if Y % 2 == 0 and 2 * X <= Y <= 4 * X:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
X, Y = [int(), input().split()]

if X % 2 == 0 and 2 * X < Y < 4 * X:
    print("Yes")
else:
    print("No")
Problem p02639 (python)

Fixed submission:
def solution():
    user_input = input()
    user_input = user_input.split()
    for i in range(len(user_input)):
        if user_input[i] == '0':
            print(i+1)
            



solution()

Buggy submission (verdict: Runtime Error):
user_input = input()
user_input = user_input.split()
for i in range(len(user_input)):
	if user_input[i] == '0':
    	print(i+1)
Problem p02664 (python)

Fixed submission:
#from pprint import pprint
#from collections import deque
#from collections import defaultdict
#from collections import Counter
#from copy import deepcopy
#from itertools
#import sys 
#sys.setrecursionlimit(N) #N回まで再起を許可する。

# = map(int,input().split())

# = list(map(int,input().split()))

# = [list(map(int,input().split())) for _ in range(XXXX)]

t = list(input())

#print(t)

#pdはプラス2カウントできるので、できるだけpdを作るように置き換える。


for i in range(len(t)):
    if t[i] == "?":
        if i == len(t)-1:
            t[i] = "D"
        elif i == 0:
            if t[i+1] == "D":
                t[i] = "P"
            else:
                t[i] = "D"
        elif t[i-1] == "P":
            t[i] = "D"
        elif t[i+1] == "P":
            t[i] = "D"
        elif t[i+1] == "D":
            t[i] = "P"
        elif t[i+1] == "?":
            t[i] = "P"
            t[i+1] = "D"

print("".join(t))

Buggy submission (verdict: Runtime Error):
#from pprint import pprint
#from collections import deque
#from collections import defaultdict
#from collections import Counter
#from copy import deepcopy
#from itertools
#import sys 
#sys.setrecursionlimit(N) #N回まで再起を許可する。

# = map(int,input().split())

# = list(map(int,input().split()))

# = [list(map(int,input().split())) for _ in range(XXXX)]

t = list(input())

#print(t)

#pdはプラス2カウントできるので、できるだけpdを作るように置き換える。

for i in range(len(t)):
    if t[i] == "?":
        if i == 0:
            if t[i+1] == "D":
                t[i] = "P"
            else:
                t[i] = "D"
        elif i == len(t)-1:
            t[i] = "D"
        elif t[i-1] == "P":
            t[i] = "D"
        elif t[i+1] == "P":
            t[i] = "D"
        elif t[i+1] == "D":
            t[i] = "P"
        elif t[i+1] == "?":
            t[i] = "P"
            t[i+1] = "D"

print("".join(t))
Problem p02678 (python)

Fixed submission:
from collections import deque


n,m = map(int,input().split())

ab_list = [list(map(int,input().split())) for _ in range(m)]

ab_count = {key:[] for key in range(1,n+1)}

for i in range(m):
    ab_count[ab_list[i][0]].append(ab_list[i][1])
    ab_count[ab_list[i][1]].append(ab_list[i][0])


#print(ab_count)

que = deque()

#始点は1、階層は0からスタート
que.append([1,0])

checked_dict = {key:[] for key in range(1,n+1)}
#temp_dict = {key:[] for key in range(1,n+1)}
where = 0

while que:
    x_pop = que.popleft()
    x = x_pop[0]
    if where != x_pop[1]:
        pass
        ##階層が代わったから、temp_dictをchecked_dictへ反映させる処理
        #for k in range(1,n+1):
        #    if len(checked_dict[k]) == 0:
        #        checked_dict[k] = temp_dict[k]
        #    else:
        #        aaa = set(checked_dict[k]) & set(temp_dict[k])
        #        if aaa != set():
        #            checked_dict[k] = list(aaa)

    where = x_pop[1]

    for j in ab_count[x]:
        if len(checked_dict[j]) == 0:
            #OK,temp_dictに入れて、queに入れる。
            #temp_dict[j].append(x)
            checked_dict[j].append(x)
            que.append([j,where+1])
        else:
            continue

    

print("Yes")
for i in range(2,n+1):
    print(checked_dict[i][0])

Buggy submission (verdict: Runtime Error):
from collections import deque


n,m = map(int,input().split())

ab_list = [list(map(int,input().split())) for _ in range(m)]

ab_count = {key:[] for key in range(1,n+1)}

for i in range(m):
    ab_count[ab_list[i][0]].append(ab_list[i][1])
    ab_count[ab_list[i][1]].append(ab_list[i][0])

for i in range(m):
    if len(ab_count[i]) == 0:
        print("No")
        exit()

#print(ab_count)

que = deque()

#始点は1、階層は0からスタート
que.append([1,0])

checked_dict = {key:[] for key in range(1,n+1)}
temp_dict = {key:[] for key in range(1,n+1)}
where = 0

while que:
    x_pop = que.popleft()
    x = x_pop[0]
    if where != x_pop[1]:
        #階層が代わったから、temp_dictをchecked_dictへ反映させる処理
        for k in range(1,n+1):
            if len(checked_dict[k]) == 0:
                checked_dict[k] = temp_dict[k]
            else:
                aaa = set(checked_dict[k]) & set(temp_dict[k])
                if aaa != set():
                    checked_dict[k] = list(aaa)

    where = x_pop[1]

    for j in ab_count[x]:
        if len(checked_dict[j]) == 0:
            #OK,temp_dictに入れて、queに入れる。
            temp_dict[j].append(x)
            que.append([j,where+1])
        else:
            continue

    

print("Yes")
for i in range(2,n+1):
    print(checked_dict[i][0])
Problem p02732 (python)

Fixed submission:
from collections import defaultdict
from pprint import pprint
#from scipy.special import comb

n = int(input())

a_list = list(map(int,input().split()))

a_dict = defaultdict(int)

for i in a_list:
    a_dict[i] += 1

#pprint(a_dict)

#総数から(a_dict[k]-1)の値を引いていく。
#例えば5C2のものが一つ減った場合、4C2になる。この差分は5C2-4C2=10-6=4 
#例えば6C2のものが一つ減った場合、5C2になる。この差分は6C2-5C2=15-10=5 
#例えば7C2のものが一つ減った場合、6C2になる。この差分は7C2-6C2=21-15=6

total = 0

#組み合わせの総数を求める。
for j in a_dict.values():
    total += j*(j-1)/2

for k in a_list:
    print(int(total - (a_dict[k]-1)))

Buggy submission (verdict: Runtime Error):
from collections import defaultdict
from pprint import pprint
from scipy.special import comb

n = int(input())

a_list = list(map(int,input().split()))

a_dict = defaultdict(int)

for i in a_list:
    a_dict[i] += 1

#pprint(a_dict)

#総数から(a_dict[k]-1)の値を引いていく。
#例えば5C2のものが一つ減った場合、4C2になる。この差分は5C2-4C2=10-6=4 
#例えば6C2のものが一つ減った場合、5C2になる。この差分は6C2-5C2=15-10=5 
#例えば7C2のものが一つ減った場合、6C2になる。この差分は7C2-6C2=21-15=6

total = 0

#組み合わせの総数を求める。
for j in a_dict.values():
    total += comb(j,2)

for k in a_list:
    print(int(total - (a_dict[k]-1)))

Buggy submission (verdict: Runtime Error):
from collections import defaultdict
from pprint import pprint
from scipy.special import comb

n = int(input())

a_list = list(map(int,input().split()))

a_dict = defaultdict(int)

for i in a_list:
    a_dict[i] += 1

#pprint(a_dict)

#総数から(a_dict[k]-1)の値を引いていく。
#例えば5C2のものが一つ減った場合、4C2になる。この差分は5C2-4C2=10-6=4 
#例えば6C2のものが一つ減った場合、5C2になる。この差分は6C2-5C2=15-10=5 
#例えば7C2のものが一つ減った場合、6C2になる。この差分は7C2-6C2=21-15=6

total = 0

#組み合わせの総数を求める。
for j in a_dict.values():
    total += comb(j,2)

for k in a_list:
    print(int(total - (a_dict[k]-1)))
Problem p02787 (python)

Fixed submission:
#from pprint import pprint
#from collections import deque
#from collections import defaultdict
#from collections import Counter
#from copy import deepcopy
#from itertools
#import sys 
#sys.setrecursionlimit(N) #N回まで再起を許可する。
 
# = map(int,input().split())
 
# = list(map(int,input().split()))
 
# = [list(map(int,input().split())) for _ in range(XXXX)]
from sys import stdin


def main():
    input = stdin.readline
    
    h,n = map(int,input().split())
    
    ab= [list(map(int,input().split())) for _ in range(n)]
    
    dp = [[float("inf") for _ in range(h+1)] for _ in range(n+1)]
    #dp[i][j]はi番目のものを選んだ時かつダメージ送料がjだったときの最小MP、
    
    
    for i in range(1,n+1):
        dp[i][0] = 0
        for j in range(h+1):
            a = ab[i-1][0]
            b = ab[i-1][1]
            dp[i][j] = min(dp[i][j],dp[i-1][j])
            if j+a <= h:
                dp[i][j+a] = min(dp[i][j] + b, dp[i-1][j+a], dp[i][j+a])
            elif j+a > h:
                dp[i][h] = min(dp[i][j] + b, dp[i-1][h], dp[i][h])

    
    print(dp[-1][-1])

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
#from pprint import pprint
#from collections import deque
#from collections import defaultdict
#from collections import Counter
#from copy import deepcopy
#from itertools
#import sys 
#sys.setrecursionlimit(N) #N回まで再起を許可する。

# = map(int,input().split())

# = list(map(int,input().split()))

# = [list(map(int,input().split())) for _ in range(XXXX)]


h,n = map(int,input().split())

ab= [list(map(int,input().split())) for _ in range(n)]

dp = [[float("inf") for _ in range(h+1)] for _ in range(n+1)]
#dp[i][j]はi番目のものを選んだ時かつダメージ送料がjだったときの最小MP、


for i in range(1,n+1):
    dp[i][0] = 0
    for j in range(h+1):
        a = ab[i-1][0]
        b = ab[i-1][1]
        elif j+a <= h:
            dp[i][j+a] = min(dp[i][j] + b, dp[i-1][j+a], dp[i][j+a])
        elif j+a > h:
            dp[i][h] = min(dp[i][j] + b, dp[i-1][h], dp[i][h])
            continue

print(dp[-1][-1])
Problem p02923 (python)

Fixed submission:
N = int(input())
H = list(map(int, input().split()))
result = []
count = 0
i = 0

for i in range (N-1):
  if H[i] >= H[i+1]:
    count += 1
  else:
    result.append(count)
    count=0

"""
while i <= N-2:#Hの最終インデックスはN-1、最終インデックスの探索は不要なのでN-2とする
  if H[i] >= H[i+1]:
    count += 1
    i += 1
  else:
    result.append(count)
    i += count+1
    count = 0
"""

result.append(count) #最終インデックスが絡む部分は上記while内ではappendされないため

print(max(result))

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
result = []
count = 0

for i in range (len(H)-1):
  if H[i] >= H[i+1]:
    count += 1
    result.append(count)
  else:
    result.append(count)
    count=0

print(max(result))

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
result = []
count = 0

for i in range (len(H)-1):
  if H[i] >= H[i+1]:
    count += 1
    result.append(count)
  else:
    result.append(count)
    count=0

print(max(result))

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
result = []
count = 0

for i in range (len(H)-1): # len(H) = 11, rangeは 0 ~ 10
  if H[i] >= H[i+1]:
    count += 1
  else:
    result.append(count)
    count=0
    continue
  result.append(count)

print(max(result))
Problem p02924 (python)

Fixed submission:
N = int(input())
result = int(N*(N-1)//2)

print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
r = range(N)
#print(r)
l = list(r)
#print(l)

if N == 1:
  print(1)
else:
  print(sum(l))

Buggy submission (verdict: Runtime Error):
N = int(input())
r = range(N)
print(r)
l = list(r)
print(l)

if N == 1:
  print(1)
else:
  print(sum(l))

Buggy submission (verdict: Runtime Error):
N = int(input())
r = range(N)
l = list(r)

print(sum(l))

Buggy submission (verdict: Runtime Error):
N = int(input())
r = range(N)
l = list(r)
sum = 0

for i in l:
  sum += l[i]

print(sum)
Problem p03469 (python)

Fixed submission:
s = str(input())

print("2018/01/{}{}".format(s[-2],s[-1]))

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

d = [int(input()) for i in range(n)]

deduplicate = set(d)

print(len(deduplicate))
Problem p03478 (python)

Fixed submission:
ls = list(map(int,input().split()))
n = ls[0]
a = ls[1]
b = ls[2]
r = 0

for i in range(1, n+1):
  s = sum(list(map(int, list(str(i)))))
  if s >= a and s <= b:
    r += i
  
print(r)

Buggy submission (verdict: Runtime Error):
ls = list(map(int,input().split()))
n = ls[0]
a = ls[1]
b = ls[2]
c = 0

for i in n:
  s = sum(list(str(i)))
  c ++ 1 if s >= a and s <= b
  
print(c)
Problem p02658 (python)

Fixed submission:
n = int(input())
l = map(int, input().split())
ans = 1
for a in l:
    if ans * a > 1e18:
        ans = -1
    elif ans != -1 or a == 0:
        ans *= a

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 1
for i in range(n):
    a = int(input())
    if ans * a > 1e18:
        ans = -1
    else:
        ans *= a

print(ans)
Problem p03288 (python)

Fixed submission:
n = int(input())
ans = ""
if n < 1200:
	ans = "ABC"
elif n < 2800:
	ans = "ARC"
else:
	ans = "AGC"

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = ""
if n < 1200:
	ans = "ABC"
else if n < 2800:
	ans = "ARC"
else:
	ans = "AGC"

print(ans)
Problem p02727 (python)

Fixed submission:
x, y, a, b, c = map(int, input().split())
p = sorted(list(map(int, input().split())), reverse=True)
q = sorted(list(map(int, input().split())), reverse=True)
r = sorted(list(map(int, input().split())), reverse=True)

p.insert(0, 10**9)
p.append(0)
q.insert(0, 10**9)
q.append(0)
r.append(0)

result = sum(p[1:x+1]) + sum(q[1:y+1])
i = 0
red_min = x
blue_min = y
flag = True

while flag == True:
    if r[i] > p[red_min] or r[i] > q[blue_min]:
        if p[red_min] < q[blue_min]:
            result = result - p[red_min] + r[i]
            i += 1
            red_min -= 1
        else:
            result = result - q[blue_min] + r[i]
            i += 1
            blue_min -= 1
    else:
        flag = False
print(result)

Buggy submission (verdict: Runtime Error):
x, y, a, b, c = map(int, input().split())
p = sorted(list(map(int, input().split())), reverse=True)
q = sorted(list(map(int, input().split())), reverse=True)
r = sorted(list(map(int, input().split())), reverse=True)

result = sum(p[:x]) + sum(q[:y])
i = 0
red_min = x-1
blue_min = y-1
flag = True

while flag == True:
    if r[i] > p[red_min] or r[i] > q[blue_min]:
        if p[red_min] < q[blue_min]:
            result = result - p[red_min] + r[i]
            i += 1
            red_min -= 1
        else:
            result = result - q[blue_min] + r[i]
            i += 1
            blue_min -= 1
    else:
        flag = False
print(result)
Problem p02899 (python)

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

ans = [0]*n

for i in range(n):
    ans[a[i]-1] = i + 1
print(" ".join(map(str, ans)))

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

ans = [0]*n

for i in range(n):
    ans[a[i]-1] = i + 1
print(" ".join(mao(str, ans)))
Problem p02909 (python)

Fixed submission:
S = str(input())
if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Buggy submission (verdict: Runtime Error):
if input() == "Sunny":
    print("Cloudy")
elif input() == "Cloudy":
    print("Rainy")
else:
    print("Sunny")
Problem p02921 (python)

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

count = 0
for i in range(3):
    if S[i] == T[i]:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
S, T = map(str, input().split())
list_S = list(S)
list_T = list(T)
count = 0
for i in range(3):
    if list_S[i] == list_T[i]:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
S, T = map(str, input().split())
list_S = list(S)
list_T = list(T)
count = 0
for i in range(3):
    if list_S(i) == list_T(i):
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
S, T = map(str, input().split())
list_S = list(S)
list_T = list(T)
count = 0
for i in 3:
    if list_S(i) == list_T(i):
        count += 1
print(count)
Problem p02952 (python)

Fixed submission:
n = int(input())
if 1 <= n <= 9:
    print(n)
elif 10 <= n <= 99:
    print(9)
elif 100 <= n <= 999:
    print(n-100+10)
elif 1000 <= n <= 9999:
    print(909)
elif 10000 <= n <= 99999:
    print(n-10000+910)
else:
    print(90909)

Buggy submission (verdict: Runtime Error):
n = int(input())
if 1 <= n <= 9:
    print(n)
elif 10 <= n <= 99:
    print(9)
elif 100 <= n <= 999:
    print(n-100+10)
elif 1000 <= n <= 9999:
    print(909)
elif 10000 <= n <= 99999:
    print(i-10000+910)
else:
    print(90909)
Problem p03029 (python)

Fixed submission:
A, P = map(int, input().split())
print(int((A*3 + P)/2))

Buggy submission (verdict: Runtime Error):
P, Q, R = map(int, input().split())
time = [P+Q, P+R, Q+R]
print(min(time))
Problem p03086 (python)

Fixed submission:
s = input()

res = []

for i in range(len(s)):
    for j in range(i, len(s)):
        check = s[i:j+1]
        if len(check) == check.count("A")+check.count("T")+check.count("C")+check.count("G"):
            res.append(len(check))
print(0 if res == [] else max(res))

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

res = []

for i in range(len(s)):
    for j in range(i, len(s)):
        check = s[i:j+1]
        if len(check) == check.count("A")+check.count("T")+check.count("C")+check.count("G"):
            res.append(len(check))
print(max(res))
Problem p03101 (python)

Fixed submission:
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h) * (W-w))

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W - (h*W + H*w - h*w)
Problem p03239 (python)

Fixed submission:
n, t = map(int, input().split())
c_t = [list(map(int, input().split())) for _ in range(n)]

cost = []

for i in range(n):
    if c_t[i][1] <= t:
        cost.append(c_t[i][0])
if len(cost) == 0:
    print("TLE")
else:
    print(min(cost))

Buggy submission (verdict: Runtime Error):
n, t = map(int, input().split())
c_t = [list(map(int, input().split())) for _ in range(n)]

cost = []

for i in range(n):
    if c_t[i][1] <= t:
        cost.append(c_t[i][0])
print(min(cost))
Problem p03273 (python)

Fixed submission:
h, w = map(int, input().split())
a = [input() for _ in range(h)]

row = [False] * h
col = [False] * w
for i in range(h):
    for j in range(w):
        if a[i][j] == "#":
            row[i] = True
            col[j] = True
for i in range(h):
    if row[i]:
        for j in range(w):
            if col[j]:
                print(a[i][j], end = "")
        print()

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
a = [input() for _ in range(h)]

row = [False] * h
col = [False] * w
for i in range(h):
    for j in range(w):
        if a[i][j] == "#":
            row[i] = True
            col[i] = True
for i in range(h):
    if row[i]:
        for j in range(w):
            if col[j]:
                print(a[i][j], end = "")
        print()
Problem p03284 (python)

Fixed submission:
n, k = map(int, input().split())
if n % k == 0:
    print("0")
else:
    print("1")

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
if n // k % 0:
    print("0")
else:
    print("1")
Problem p03351 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
if abs(c-a) <= d or (abs(c-b) <= d and abs(b-a) <=d):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if abs(c-a) <= d or (abs(c-b) <= d and abs(b-a) <=d:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if b-a <= d or c-b <= d:
    print(Yes)
else:
    print("No")
Problem p03455 (python)

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

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

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

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

Buggy submission (verdict: Runtime Error):
a,b = map(int, input(), split())
if a*b % 2:
    ptint('Odd')
else:
    print('Even')

Buggy submission (verdict: Runtime Error):
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "a,b = map(int, input(), split())\n",
    "if a*b % 2:\n",
    "    ptint('Odd')\n",
    "else:\n",
    "    print()\n",
    "    "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
Problem p03485 (python)

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

Buggy submission (verdict: Runtime Error):
s = str(input())
t = str(input())
s = (sorted(s))
t = (sorted(t,reverse = True))
s2 = ''.join(s)
t2 = ''.join(t)

if s2 < t2:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
s = str(input())
t = str(input())
s2 = ''.join(sorted(s))
t2 = ''.join(sorted(t,reverse=True))

if s2 < t2:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
s = str(input())
t = str(input())
s2 = ''.join(sorted(s))
t2 = ''.join(sorted(t))

if s2 < t2:
    print('Yes')
else:
    print('No')
Problem p03493 (python)

Fixed submission:
a = str(input())
s = 0
for i in range(0, 3):
    if a[i] == '1':
        s += 1
print(s)

Buggy submission (verdict: Runtime Error):
a = str(input())
s = o
for i in range(0, 3):
    if a[i] == '1':
        s += 1
print(s)
Problem p03494 (python)

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

def x(n):
    ans = 0
    while n % 2 == 0:
        n /= 2
        ans += 1
    return ans

ans = min(map(x, A))

print(ans)

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

ans = 0

while A % 2 == 0:
    A = A / 2
    ans = ans +1
return ans

print(ans)
Problem p03563 (python)

Fixed submission:
r = int(input())
g = int(input())
print(int(2*g - r))

Buggy submission (verdict: Runtime Error):
r = input()
g = input()
print(2*g - r)
Problem p03574 (python)

Fixed submission:
h, w = map(int, input().split())
s = list(input() for _ in range(h))

for i in range(h):
    ans = ""
    for j in range(w):
        if s[i][j] == "#":
            ans += "#"
        else:
            ans += str(sum(k[max(0, j-1):min(w, j+2)].count('#') for k in s[max(0, i-1):min(h, i+2)]))
    print(ans)

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
s = list(input() for _ in range(h))

for i in range(h):
    ans = ""
    for j in range(w):
        if s[i][j] == "#":
            ans += "#"
        else:
            ans += str(sum(k[max(0, j-1):min(w, j+2)]) for k in s[max(0, i-1):min(h, i+2)]
        print(ans)
Problem p03624 (python)

Fixed submission:
s = input()

res = "abcdefghijklmnopqrstuvwxyz"

for i in range(len(s)):
    res = res.replace(s[i], "")
if len(res) == 0:
    print("None")
else:
    print(res[0])

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

res = "abcdefghijklmnopqrstuvwxyz"

for i in range(len(s)):
    res = res.replace(s[i], "")
if len(s) == 0:
    print("None")
else:
    print(res[0])
Problem p03644 (python)

Fixed submission:
n = int(input())

ans = 1

while ans*2 <= n:
    ans *= 2
print(ans)

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

ans = 1
whille ans*2 <= n:
    ans *= 2
print(ans)

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

ans = 1
whille ans*2 <= n:
    ans += 2
print(ans)