Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]

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

b = []
for i in range(n):
    b.append(ab[i][1])

x = 0 #本数
y = 0 #金額

while m > x:
    if b[a.index(min(a))] > 0:
        y += min(a)
        b[a.index(min(a))] -= 1
        x += 1
    else:
        del b[a.index(min(a))]
        del a[a.index(min(a))]
        continue

print(y)


Fixed submission:
n, m = map(int, input().split())
ab = [tuple(map(int, input().split())) for _ in range(n)]

ab.sort(key=lambda x:x[0])

cnt = 0
price = 0
i = 0
while cnt < m:
    price += ab[i][0] * ab[i][1]
    cnt += ab[i][1]
    if cnt > m:
        price -= ab[i][0] * (cnt - m)
        break
    i += 1

print(price)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
s2 = s
while "01" in s2 or "10" in s2:
    if "01" in s2:
        s2 = s2.replace("01", "")
    elif "10" in s2:
        s2 = s2.replace("10", "")

print(len(s) - len(s2))

Fixed submission:
s = input()
ans = min(s.count("0"), s.count("1")) * 2
print(ans)

Buggy python submission (verdict: Runtime Error):
s = input()
s2 = s
while "01" in s2 or "10"in s2::
    if "01" in s2:
        s2 = s2.replace("01", "")
    elif "10" in s2:
        s2 = s2.replace("10", "")

print(len(s) - len(s2))

Fixed submission:
s = input()
ans = min(s.count("0"), s.count("1")) * 2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
s2 = s
while True:
    if "01" in s2:
        s2 = s2.replace("01", "")
    elif "10" in s2:
        s2 = s2.replace("10", "")
    elif not "01" in s2 and not "10"in s2:
        break

print(len(s) - len(s2))

Fixed submission:
s = input()
ans = min(s.count("0"), s.count("1")) * 2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
s2 = s
while True:
    if "01" in s2:
        s2 = s2.replace("01", "")
    elif "10" in s2:
        s2 = s2.replace("10", "")
    elif not "01" in s2 and not "10"in s2:
        break

print(len(s) - len(s2))

Fixed submission:
s = input()
ans = min(s.count("0"), s.count("1")) * 2
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

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

ans = A[0]
for i in range(n):
    ans = gcd(ans, A[i])

print(ans)

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

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

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

print(ans)

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

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

ans = A[0]
for i in range(n):
    ans = gcd(ans, A[i])

    print(ans)

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

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

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

print(ans)
Buggy python submission (verdict: Runtime Error):
n,k = list(map(int,input().split()))

nn = 1
count_n = 1
while nn < n:
    nn += 2
    count_n += 1
    
if n,k == 2,2:
    print("NO")
elif count_n >= k:
    print("YES")
elif count_n < k:
    print("NO")

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

count_n = 1
while n > 2:
    n -= 2
    count_n += 1
    
if count_n >= k:
    print("YES")
elif count_n < k:
    print("NO")
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = list(map(int, input().split()))

if l.count(max(l)) >= 2:
    print("No")
    break
elif max(l) < sum(l) - max(l):
    print("Yes")
else:
    print("No")

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

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

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

if l.count(max(l)) >= 2:
    print("No")
    break
elif max(l) < sum(l) - max(l):
    print("Yes")
else:
    print("No")

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

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

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

if l.count(max(l)) >= 2:
    print("No")
    b
elif max(l) < sum(l) - max(l):
    print("Yes")
else:
    print("No")

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

if max(l) < sum(l)-max(l):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
N, W = map(int, input().split())
wv = [list(map(int, input().split())) for _ in range(N)]

dp = [[0 for _ in range(W+10)] for _ in range(N+5)]
dp[0][0] = 0

for w in range(W+1):
    for n in range(N):
        Wi = wv[n][0]
        Vi = wv[n][1]
        if Wi <= w:
            dp[n+1][w] = max(dp[n][w], dp[n][w-Wi] + Vi)
        dp[n+1][w] = max(dp[n][w], dp[n+1][w])

print(dp[N][W])

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

INF = 10 ** 10
dp = [INF] * N

dp[0] = 0

for i in range(1, N):
    dp[i] = min(dp[i], dp[i-1] + abs(H[i] - H[i-1]))
    if i > 1:
        dp[i] = min(dp[i], dp[i-2] + abs(H[i] - H[i-2]))

print(dp[N-1])

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

INF = 10 ** 6
dp = [INF] * N

dp[0] = 0

for i in range(1, N):
    dp[i] = min(dp[i], dp[i-1] + abs(H[i] - H[i-1]))
    if i > 1:
        dp[i] = min(dp[i], dp[i-2] + abs(H[i] - H[i-2]))

print(dp[N-1])

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

INF = 10 ** 10
dp = [INF] * N

dp[0] = 0

for i in range(1, N):
    dp[i] = min(dp[i], dp[i-1] + abs(H[i] - H[i-1]))
    if i > 1:
        dp[i] = min(dp[i], dp[i-2] + abs(H[i] - H[i-2]))

print(dp[N-1])

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

INF = 10 ** 6
dp = [INF] * N

dp[0] = 0

for i in range(2, N):
    dp[i] = min(dp[i], dp[i-1] + abs(H[i] - H[i-1]))
    if i > 1:
        dp[i] = min(dp[i], dp[i-2] + abs(H[i] - H[i-2]))

print(dp[N-1])

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

INF = 10 ** 10
dp = [INF] * N

dp[0] = 0

for i in range(1, N):
    dp[i] = min(dp[i], dp[i-1] + abs(H[i] - H[i-1]))
    if i > 1:
        dp[i] = min(dp[i], dp[i-2] + abs(H[i] - H[i-2]))

print(dp[N-1])
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
H = list(map(int, input().split()))

INF = 10 ** 10
dp = [INF] * N

dp[0] = 0

for i in range(1, N):
    for j in range(min(K, i) + 1):
        dp[i] = min(dp[i], dp[i-j] + abs(H[i] - H[i-j]))

print(dp[N-1])

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

INF = 10 ** 10
dp = [INF] * N

dp[0] = 0

for i in range(1, N):
    for j in range(min(K, i) + 1):
        dp[i] = min(dp[i], dp[i-j] + abs(H[i] - H[i-j]))

print(dp[N-1])
Buggy python submission (verdict: Runtime Error):
N = int(input())
abc = [list(map(int, input().split())) for _ in range(3)]

dp = [[0] * 3 for _ in range(N+1)]

for i in range(1, N+1):
    for j in range(3):
        for k in range(3):
            if j != k:
                dp[i][j] = max(dp[i][j], dp[i-1][k] + abc[i-1][k])

print(max(dp[N]))

Fixed submission:
N = int(input())
abc = [list(map(int, input().split())) for _ in range(N)]

dp = [[0] * 3 for _ in range(N+1)]

for i in range(1, N+1):
    for j in range(3):
        for k in range(3):
            if j != k:
                dp[i][j] = max(dp[i][j], dp[i-1][k] + abc[i-1][k])

print(max(dp[N]))
Buggy python submission (verdict: Runtime Error):
n = int(input())
p = [int(input()) for i in range(n)]

price = sum(p) - max(p) / 2
print(int(price)

Fixed submission:
n = int(input())
p = [int(input()) for i in range(n)]

price = sum(p) - max(p) / 2
print(int(price))
Buggy python submission (verdict: Runtime Error):
n = int(input())

if n == 7 , 5 ,3:
  print("YES")
else:
  print("NO")

Fixed submission:
n = int(input())

if n in [7 , 5 ,3]:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
s = input()

for i in range(len(s)-2):
  dif = []
  dif.join(abs(int(s[x:y])-753))

print(min(dif))

Fixed submission:
s = input()
dif = []
x = 0
y = 3 
for i in range(len(s)-2):
    dif.append(abs(int(s[x:y])-753))
    x += 1
    y += 1
 
print(min(dif))
Buggy python submission (verdict: Runtime Error):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))

li = []
for i in range(len(h)):
  li.append(abs(a - (t - h[i]*0.006)))
  
print(li.index(min(li)))

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

yen = x+y/2
print(int(yen))

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

li = []
for i in range(len(h)):
  li.append(abs(a - t - h[i]*0.006))
  
print(li.index(min(li)))

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

yen = x+y/2
print(int(yen))
Buggy python submission (verdict: Runtime Error):
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))

li = []
for i in range(len(h)):
  li.append(int(t - h[i]*0.006))
  
print(index(min(li)))

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

li = []
for i in range(n):
  li.append(abs(a - (t - h[i]*0.006)))
  
print(li.index(min(li))+1)

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

li = []
for i in range(len(h)):
  li.append(t - h[i]*0.006)
  
print(index(min(li)))

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

li = []
for i in range(n):
  li.append(abs(a - (t - h[i]*0.006)))
  
print(li.index(min(li))+1)
Buggy python submission (verdict: Runtime Error):
n, t = map(int, input())
ct = [map(int(input())) for _ in range(n)]

li = []
for i in range(n):
  if ct[i][1] < t:
    li.append(ct[i])
  else:
    continue

if count(li) > 0:
  print(min(li[:][0]))
else:
  print("TLE")

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

li = []
for i in range(n):
  if ct[i][1] <= t:
    li.append(ct[i])
  else:
    continue

if len(li) > 0:
  li2 = []
  for i in range(len(li)):
    li2.append(li[i][0])
  print(min(li2))
else:
  print("TLE")
Buggy python submission (verdict: Runtime Error):
n = input()

print(n.translate(str.maketrans({"1":"9", "9":"1"}))

Fixed submission:
n = input()

print(n.translate(str.maketrans({"1":"9", "9":"1"})))
Buggy python submission (verdict: Runtime Error):
n = int(input())
li = [111,222,333,444,555,666,777,888,999]
nn = []
for i in range(len(li)):
  if li[i] - n >= 0:
    nn.append(li[i]-n)
  else:
    nn.append(1000)
  
print(li[index(min(nn))])

Fixed submission:
n = int(input())
li = [111,222,333,444,555,666,777,888,999]
nn = []
for i in range(len(li)):
  if li[i] - n >= 0:
    nn.append(li[i]-n)
  else:
    nn.append(1000)
  
print(li[nn.index(min(nn))])

Buggy python submission (verdict: Runtime Error):
n = int(input())
li = [111,222,333,444,555,666,777,888,999]
nn = []
for i in range(len(li)):
  nn.append(abs(li[i]-n))
  
print(li[min(nn)])

Fixed submission:
n = int(input())
li = [111,222,333,444,555,666,777,888,999]
nn = []
for i in range(len(li)):
  if li[i] - n >= 0:
    nn.append(li[i]-n)
  else:
    nn.append(1000)
  
print(li[nn.index(min(nn))])
Buggy python submission (verdict: Runtime Error):
n = int(input())
v = list(map(int, input().split()))

even = {}
odd = {}

for i in range(n):
    if i % 2 == 0:
        if v[i] not in even:
            even[v[i]] = 0
        even[v[i]] += 1
    else:
        if v[i] not in odd:
            odd[v[i]] = 0
        odd[v[i]] += 1

even_sorted = sorted(even.items(), key=lambda x:x[1])[::-1]
odd_sorted = sorted(odd.items(), key=lambda x:x[1])[::-1]

ans = 0
if even_sorted[0][0] != odd_sorted[0][0]:
    ans += n - even_sorted[0][1] - odd_sorted[0][1]
else:
    x = n - even_sorted[0][1] - odd_sorted[1][1]
    y = n - even_sorted[1][1] - odd_sorted[0][1]
    ans += min(x, y)

print(ans)

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

even = {}
odd = {}

for i in range(n):
    if i % 2 == 0:
        if v[i] not in even:
            even[v[i]] = 0
        even[v[i]] += 1
    else:
        if v[i] not in odd:
            odd[v[i]] = 0
        odd[v[i]] += 1

even_sorted = sorted(even.items(), key=lambda x:x[1])[::-1]
odd_sorted = sorted(odd.items(), key=lambda x:x[1])[::-1]

ans = 0
if even_sorted[0][0] != odd_sorted[0][0]:
    ans += n - even_sorted[0][1] - odd_sorted[0][1]
else:
    if len(even_sorted) == 1 or len(odd_sorted) == 1:
        even_sorted.append((-1, 0))
        odd_sorted.append((-1, 0))
    x = n - even_sorted[0][1] - odd_sorted[1][1]
    y = n - even_sorted[1][1] - odd_sorted[0][1]
    ans += min(x, y)

print(ans)

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

even = {}
odd = {}

for i in range(n):
    if i % 2 == 0:
        if v[i] not in even:
            even[v[i]] = 0
        even[v[i]] += 1
    else:
        if v[i] not in odd:
            odd[v[i]] = 0
        odd[v[i]] += 1

even_sorted = sorted(even.items(), key=lambda x:x[i])[::-1]
odd_sorted = sorted(odd.items(), key=lambda x:x[i])[::-1]

ans = 0
if even_sorted[0][0] != odd_sorted[0][0]:
    ans += n - even_sorted[0][1] - odd_sorted[0][1]
else:
    x = n - even_sorted[0][1] - odd_sorted[1][1]
    y = n - even_sorted[1][1] - odd_sorted[0][1]
    ans += min(x, y)

print(ans)

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

even = {}
odd = {}

for i in range(n):
    if i % 2 == 0:
        if v[i] not in even:
            even[v[i]] = 0
        even[v[i]] += 1
    else:
        if v[i] not in odd:
            odd[v[i]] = 0
        odd[v[i]] += 1

even_sorted = sorted(even.items(), key=lambda x:x[1])[::-1]
odd_sorted = sorted(odd.items(), key=lambda x:x[1])[::-1]

ans = 0
if even_sorted[0][0] != odd_sorted[0][0]:
    ans += n - even_sorted[0][1] - odd_sorted[0][1]
else:
    if len(even_sorted) == 1 or len(odd_sorted) == 1:
        even_sorted.append((-1, 0))
        odd_sorted.append((-1, 0))
    x = n - even_sorted[0][1] - odd_sorted[1][1]
    y = n - even_sorted[1][1] - odd_sorted[0][1]
    ans += min(x, y)

print(ans)
Buggy python submission (verdict: Runtime Error):
n, m, x, y = map(int, input().split())
x_li = list(map(int, input().split()))
y_li = list(map(int, input().split()))
if  x < y and max(x_li)+1 <= min(y_li):
    print("No War")
else:
    print("Wa

Fixed submission:
n,m,x,y=map(int,input().split())
xl=list(map(int,input().split()))
yl=list(map(int,input().split()))
 
xl.append(x)
yl.append(y)
if max(xl) < min(yl) and x < y:
    print('No War')
else:
    print('War')
Buggy python submission (verdict: Runtime Error):
ab = list(map(int,input().split()))

if ab in 2:
  print("No")
else:
  print("Yes")

Fixed submission:
ab = list(map(int,input().split()))
 
if 2 in ab:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
h, w = map(int, input())
a = [list(input()) for i 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]:
        ans = ""
        for j in range(w):
            if col[j]:
                ans.join(a[i][j])
        print(ans)

Fixed submission:
h, w = map(int, input().split())
a = [list(input()) for i 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 python submission (verdict: Runtime Error):
n = int(input())

for i in range(1, n//4+1):
    for j in range(1, n//7+1):
        if i*4 + j*7 == n:
            print("Yes")
            break
        elif i == n//4 and j == n//7:
            print("No")
            break
    else:
        continue
    break

Fixed submission:
n,k = map(int,input().split())
if n%k>0:
  print(1)
elif n%k==0:
  print(0)
Buggy python submission (verdict: Runtime Error):
ans = 10000
for i in range(2**D):
    s = 0
    cnt = 0
    b = [0] * D
    
    #各問題についてボーナスまで解くか手を付けないかでbit全探索
    for j in range(D):
        if (i >> j) & 1:
            s += 100 * (j + 1) * pc[j][0] + pc[j][1]
            cnt += pc[j][0]
            b[j] = 1

    #足りない点数分を解く
    flag1 = False
    flag2 = True
    if s < G:
        for k in range(D)[::-1]:
            if b[k] == 0:
                for x in range(pc[k][0]):
                    s += 100 * (k + 1)
                    cnt += 1
                    if s >= G:
                        flag1 = True
                        break
                else:
                    flag2 = False
                    break
            if flag1:
                break

    if flag2:
        ans = min(ans, cnt)


print(ans)

Fixed submission:
D, G = map(int, input().split())
pc = [tuple(map(int, input().split())) for _ in range(D)]

ans = 10000
for i in range(2**D):
    s = 0
    cnt = 0
    b = [0] * D
    
    #各問題についてボーナスまで解くか手を付けないかでbit全探索
    for j in range(D):
        if (i >> j) & 1:
            s += 100 * (j + 1) * pc[j][0] + pc[j][1]
            cnt += pc[j][0]
            b[j] = 1

    #足りない点数分を解く
    flag1 = False
    flag2 = True
    if s < G:
        for k in range(D)[::-1]:
            if b[k] == 0:
                for x in range(pc[k][0]):
                    s += 100 * (k + 1)
                    cnt += 1
                    if s >= G:
                        flag1 = True
                        break
                else:
                    flag2 = False
                    break
            if flag1:
                break

    if flag2:
        ans = min(ans, cnt)


print(ans)
Buggy python submission (verdict: Runtime Error):
n = input()

for i in range(len(n)):
    nsum += int(n[i])
    
if int(n) % nsum == 0:
    print("Yes")
else:
    print("No")

Fixed submission:
n = input()

nsum = 0
for i in range(len(n)):
    nsum += int(n[i])

if int(n) % nsum == 0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a, b = int(input())
if a <= 8 and b <= 8:
  print("Yay!")
else:
  print(":(")

Fixed submission:
a, b = map(int,input().split())
if a <= 8 and b <= 8:
  print("Yay!")
else:
  print(":(")
Buggy python submission (verdict: Runtime Error):
d, n = map(int, input.split())
print((100**d)*n)

Fixed submission:
d, n = map(int, input().split())
if n <= 99:
    print((100**d)*n)
elif n == 100:#このとき100で割れる回数が増えるので例外
    print((100**d)*101)
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input())

if abs(a-b)<= d and abs(b-c)<=d:
  print("Yes")
elif abs(a-c) <= d:
  print("Yes")
else:
  print("No")

Fixed submission:
a, b, c, d = map(int, input().split())
 
if abs(a-b)<= d and abs(b-c)<=d:
  print("Yes")
elif abs(a-c) <= d:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
s = input()
if "".join(s.sort()) == "abc":
  print("Yes")
else:
  print("No")

Fixed submission:
s = input()
 
if not s.count("a") == 1:
  print("No")
elif not s.count("b") == 1:
  print("No")
elif not s.count("c") == 1:
  print("No")
else:
  print("Yes")

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

if s.count("a"), s.count("b"), s.count("c") == 1,1,1:
  print("YES")
else:
  print("NO")

Fixed submission:
s = input()
 
if not s.count("a") == 1:
  print("No")
elif not s.count("b") == 1:
  print("No")
elif not s.count("c") == 1:
  print("No")
else:
  print("Yes")

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

if not s.count("a") == 1:
  print("NO")
  break
elif not s.count("b") == 1:
  print("NO")
  break
elif not s.count("c") == 1:
  print("NO")
  break
else:
  print("YES")

Fixed submission:
s = input()
 
if not s.count("a") == 1:
  print("No")
elif not s.count("b") == 1:
  print("No")
elif not s.count("c") == 1:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())

ans = list(range(a, a+k)) + list(range(b-k, b))
ans2 = [i for i in ans if a<=i<=b and i not in ans2]

for j in ans2:
    print(j)

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

ans = list(range(a, a+k)) + list(range(b-k+1, b+1))
ans.sort()
ans2 = []
for i in ans:
    if a<=i<=b and i not in ans2:
        ans2.append(i)

for j in ans2:
    print(j)

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

ans = []
for i in range(k):
    if a+i <= b:
        ans.append(a+i)
for j in range(k):
    if a <= b-k+j and b-k+j not in ans:
        ans.append(b-k+j)

for n in ans.sort():
    print(n)

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

ans = list(range(a, a+k)) + list(range(b-k+1, b+1))
ans.sort()
ans2 = []
for i in ans:
    if a<=i<=b and i not in ans2:
        ans2.append(i)

for j in ans2:
    print(j)
Buggy python submission (verdict: Runtime Error):
a, b = input().split()
ab = int(a+b)
print("Yes" if ab**(1/2))%1==0 else "No")

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

print("Yes" if ab**(1/2)%1==0 else "No")

Buggy python submission (verdict: Runtime Error):
a,b=input()
ab = int(a+b)
print("Yes" if type(ab**(1/2))==int else "No")

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

print("Yes" if ab**(1/2)%1==0 else "No")
Buggy python submission (verdict: Runtime Error):
N, Y = map(int, input())

flag = False
for x in range(N+1):
    for y in range(N+1):
        z = N - (x + y)
        if Y == 10000 * x + 5000 * y + 1000 * z:
            flag = True
            print(x, y, z)
            break
    if flag:
        break

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

flag = False
for x in range(N+1):
    for y in range(N-x+1):
        z = N - (x + y)
        if Y == 10000 * x + 5000 * y + 1000 * z:
            flag = True
            print(x, y, z)
            break
    if flag:
        break
else:
    print(-1, -1, -1)

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

for x in range(N+1):
    for y in range(N+1):
        z = N - (x + y)
        if Y == 10000 * x + 5000 * y + 1000 * z:
            flag = True
            print(x, y, z)
            break
    if flag:
        break

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

flag = False
for x in range(N+1):
    for y in range(N-x+1):
        z = N - (x + y)
        if Y == 10000 * x + 5000 * y + 1000 * z:
            flag = True
            print(x, y, z)
            break
    if flag:
        break
else:
    print(-1, -1, -1)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
s = input()

if s[a+1] == "-":
    s2 = s[:a+1] + s[a+2:]
    for i in range(a+b):
        if s2[i] not in ["0","1","2","3","4","5","6","7","8","9"]:
            print("No")
            break
    else:
        print("Yes")
else:
    print("No")

Fixed submission:
print(48 - int(input()))
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
s = input()

if s[a] == "-":
    s[a] = ""
    if s.isdigit():
        print("Yes")
    else:
        print("No")
else:
    print("No")

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

if s[:a].isdecimal() and s[a]=="-" and s[a+1:].isdecimal():
    print("Yes")
else:
    print("No")

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

if s[a+1] == "-":
    s2 = s[:a+1] + s[a+2:]
    for i in range(a+b+1):
        if s2[i] not in ["0","1","2","3","4","5","6","7","8","9"]:
            print("No")
            break
    else:
        print("Yes")
else:
    print("No")

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

if s[:a].isdecimal() and s[a]=="-" and s[a+1:].isdecimal():
    print("Yes")
else:
    print("No")