Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def whatIsMinNumber(X_copy,K):
    pickupNum = X_copy[len(X_copy)//2]
    X_rest = X[:]
    X_rest.remove(pickupNum)
    if can_do_number(X_rest,0,K-pickupNum,K-1):
        if len(X_copy) > 2:
            return whatIsMinNumber(X_copy[len(X_copy)//2+1:len(X_copy)],K)
        else:
            return pickupNum
    else:
        if len(X_copy) > 1:
            return whatIsMinNumber(X_copy[0:len(X_copy)//2],K)
        else:
            return pickupNum+1

def can_do_number(X,sum,min,max):
    if len(X) == 0:
        return False
    for i in range(0,len(X)):
        if min <= sum+X[i] <= max:
            return True
        elif min > sum+X[i]:
            X_rest = X[:]
            sum = sum + X_rest.pop(i)
            can_do_number(X_rest,sum,min,max)
        else:
            pass
    return False

N,K = list(map(int, input().split()))
X = list(map(int, input().split()))
X = [6,20,10,4,3,10,25,2]
N = X.pop(0)
K = X.pop(0)
X.sort(reverse = True)
thenum = whatIsMinNumber(X[:],K)
print(len(list(filter((lambda x:x<whatIsMinNumber(X[:],K)),X))))

Fixed submission:
a,b = input().split()
if a == b:
     print('H')
else:
     print('D')

Buggy python submission (verdict: Runtime Error):
def whatIsMinNumber(X_copy,K):
    pickupNum = X_copy[len(X_copy)//2]
    X_rest = X[:]
    X_rest.remove(pickupNum)
    if can_do_number(X_rest,pickupNum,K,K+pickupNum-1):
        if len(X_copy) > 2:
            return whatIsMinNumber(X_copy[len(X_copy)//2+1:len(X_copy)],K)
        else:
            return pickupNum
    else:
        if len(X_copy) > 1:
            return whatIsMinNumber(X_copy[0:len(X_copy)//2],K)
        else:
            return pickupNum+1

def can_do_number(X,sum,min,max):
    #残りのカードがない場合はFalseを返す
    if len(X) == 0:
        return False
    #残りのカードで順番に調べる
    for i in range(0,len(X)):
        if min <= sum+X[i] <= max:
            return True
        elif min > sum+X[i]:
            X_rest = X[:]
            sum = sum + X_rest.pop(i)
            can_do_number(X_rest,sum,min,max)
        else:
            pass
    return False

N,K = list(map(int, input().split()))
X = list(map(int, input().split()))
X.sort(reverse = True)
thenum = whatIsMinNumber(X[:],K)
print(len(list(filter((lambda x:x<thenum),X))))

Fixed submission:
a,b = input().split()
if a == b:
     print('H')
else:
     print('D')

Buggy python submission (verdict: Runtime Error):
X = int(input())
P = {0}
i=1
while True:
    Q = {0}
    for p in P:
        Q.add(p+i)
        Q.add(p-i)
    P = P.union(Q)
    if X in P:
        print(i)
        break
    i = i+1

Fixed submission:
a,b = input().split()
if a == b:
     print('H')
else:
     print('D')

Buggy python submission (verdict: Time Limit Exceeded):
X = map(int,input().split())
#X=7
P = {0}
i=1
while True:
    Q = {0}
    for p in P:
        Q.add(p+i)
        Q.add(p-i)
    P = P.union(Q)
    if X in P:
        print(i)
        break
    i = i+1


Fixed submission:
a,b = input().split()
if a == b:
     print('H')
else:
     print('D')
Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
P = {0}
i=1
while True:
    Q = {0}
    for p in P:
        Q.add(p+i)
        Q.add(p-i)
    P = P.union(Q)
    if X in P:
        print(i)
        break
    i = i+1

Fixed submission:
X = int(input())
a = 0
while X >0:
    a += 1
    X -= a
print (a)

Buggy python submission (verdict: Time Limit Exceeded):
X = map(int,input().split())
#X=7
P = {0}
i=1
while True:
    Q = {0}
    for p in P:
        Q.add(p+i)
        Q.add(p-i)
    P = P.union(Q)
    if X in P:
        print(i)
        break
    i = i+1


Fixed submission:
X = int(input())
a = 0
while X >0:
    a += 1
    X -= a
print (a)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
s = a[0]
ans = 0
for i in range(1, n):
    ans +=  abs(s + a[i]) + 1 if s * (s + a[i]) >= 0 else 0
    s = -1 * s // abs(s) if s * (s + a[i]) >= 0 else s + a[i]

print(ans)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans = 10 ** 100
p = lambda x, y: x * y >= 0
po = lambda x, y: abs(x + y) + 1 if p(x, x + y) else 0
popo = lambda x, y: -1 * x // abs(x) if p(x, x + y) else x + y


if a[0] == 0:
    s = [1, -1]
    tmpAns = [1, 1]
    for (_s, _ans) in zip(s, tmpAns):
        for i in range(1, n):
            _ans +=  po(_s, a[i])
            _s = popo(_s, a[i])
        ans = min((ans, _ans))
else:
    s = [a[0], -1 * a[0] // abs(a[0])]
    tmpAns = [0, abs(a[0]) + 1]
    for (_s, _ans) in zip(s, tmpAns):
        for i in range(1, n):
            _ans +=  po(_s, a[i])
            _s = popo(_s, a[i])
        ans = min((ans, _ans))

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


N,M = map(int,input().split())
G = [[] for i in range(N)]
visited = [False for i in range(N)]

for i in range(M):
    a,b = map(lambda x:int(x)-1,input().split())
    G[a].append(b)
    G[b].append(a)


s = 0
t = G[s][0]

path = [s,t]
solved = [False, False]
visited[s] = True
visited[t] = True

while(True):
    if not solved[0]:
        for n in G[s]:
            if visited[n]:
                continue
            visited[n] = True
            s = n
            path = [s] + path
            break
        else:
            if solved[1]:
               break 
            solved[0] = True

    if not solved[1]:
        for n in G[t]:
            if visited[n]:
                continue
            visited[n] = True
            t = n
            path = path + [t]
            break
        else:
            if solved[0]:
                break
            solved[1] = True
print(len(path))
print(' '.join((map(lambda x:str(x+1), path))))


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

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

if N == 1:
    print(1)
    quit()

if A[0] < A[1]:
    tend = 1
elif A[0] > A[1]:
    tend = -1
else:
    tend = 0

count = 1
prev = A[1]

for a in A[2:]:
    if prev < a and tend < 0:
        tend = 0
        count += 1
    elif prev > a and tend > 0:
        tend = 0
        count += 1
    elif tend == 0:
        if prev < a:
            tend = 1
        elif prev > a:
            tend = -1
        else:
            tend = 0

    prev = a

print(count)

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

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

tend = 1 if A[0] < A[1] else -1
count = 1
prev = A[1]

for a in A[2:]:
    if prev < a and tend < 0:
        tend = 0
        count += 1
    elif prev > a and tend > 0:
        tend = 0
        count += 1
    elif tend == 0:
        if prev < a:
            tend = 1
        elif prev > a:
            tend = -1
        else:
            tend = 0

    prev = a

print(count)


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

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

if N == 1:
    print(1)
    quit()

if A[0] < A[1]:
    tend = 1
elif A[0] > A[1]:
    tend = -1
else:
    tend = 0

count = 1
prev = A[1]

for a in A[2:]:
    if prev < a and tend < 0:
        tend = 0
        count += 1
    elif prev > a and tend > 0:
        tend = 0
        count += 1
    elif tend == 0:
        if prev < a:
            tend = 1
        elif prev > a:
            tend = -1
        else:
            tend = 0

    prev = a

print(count)
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = list(map(int, input().split()))
cnt = 0
for i in range(n):
    if i == l[l[i] - 1] - 1:
        cnt+=1
cnt //= 2
print(cnt)


Fixed submission:
s = input()
s = s[:4] + ' ' + s[4:]
print(s)

Buggy python submission (verdict: Runtime Error):
    s = input()
    s = s[:4] + ' ' + s[4:]
    print(s)

Fixed submission:
s = input()
s = s[:4] + ' ' + s[4:]
print(s)

Buggy python submission (verdict: Runtime Error):
s = input()
s = s[:4] + '  ' s[4:]
print(s)

Fixed submission:
s = input()
s = s[:4] + ' ' + s[4:]
print(s)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
#(i,j)=7i+j-7
x=0
for i in range(11):
    if (9*i)%11==k:
        x=i
        break
ans=0
for i in range((7*n)//11+1):
    s=11*i+x
    if s>7*n-7:
        continue
    if s<=7:
        continue
    if s%7==0 or s%7==1:
        continue
    else:
        ans+=1
print(ans)


Fixed submission:
n,k=map(int,input().split())
#(i,j)=7i+j-7
x=0
for i in range(11):
    if (9*i)%11==k:
        x=i
        break
K=0
L=0
for i in range(1,78):
    if i%11!=x:
        continue
    if i%7<=1:
        continue
    K+=1
    if i<=7:
        L+=1
P=0
for i in range(1,7*(n%11)+1):
    if i%11!=x:
        continue
    if i%7<=1:
        continue
    if i>(7*(n%11)-7):
        continue
    P+=1
print(K*(n//11)+P-L)

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
#(i,j)=7i+j-7
x=0
for i in range(11):
    if (9*i)%11==k:
        x=i
        break
ans=0
for i in range((7*n)//11+1):
    s=11*i+x
    if s>7*n-7:
        continue
    if s<=7:
        continue
    if s%7==0 or s%7==1:
        continue
    else:
        ans+=1
print(ans)


Fixed submission:
n,k=map(int,input().split())
#(i,j)=7i+j-7
x=0
for i in range(11):
    if (9*i)%11==k:
        x=i
        break
K=0
L=0
for i in range(1,78):
    if i%11!=x:
        continue
    if i%7<=1:
        continue
    K+=1
    if i<=7:
        L+=1
P=0
for i in range(1,7*(n%11)+1):
    if i%11!=x:
        continue
    if i%7<=1:
        continue
    if i>(7*(n%11)-7):
        continue
    P+=1
print(K*(n//11)+P-L)
Buggy python submission (verdict: Runtime Error):
#include <bits/stdc++.h>
// #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <math.h>

using namespace std;
typedef long long ll;

#define rep(i,n) for(int i=0;i<n;i++)
#define rep2(i,a,b) for(int i=(a);i<(b);i++)

template<class T> inline void chmin(T& a, T b) {if (a > b) a = b;}
template<class T> inline void chmax(T& a, T b) {if (a < b) a = b;}
const ll inf = 1LL<<60;

int main() {
  int n,k,high;cin>>n>>k;
  ll ans=inf;
  ll now=0;
  int color=0;

  vector<int> a(n);
  rep(i,n){
    cin>>a[i];
  }
  for(int i=0;i<(1<<n);i++){
    high=a[0];
    color=1;
    now=0;
    for(int j=1;j<n;j++){
      if(1 & (i>>j)){
        if(a[j]<=high){
          now+=high-a[j]+1;
          high=high+1;
          color+=1;
        }else{
          color+=1;
        }
      }else{
        if(high<a[j]){
          high=a[j];
          color+=1;
        }
      }
    }
    if(k<=color){
      ans=min(ans,now);
    }
  }
  cout<<ans<<endl;
}


Fixed submission:
n,k = map(int,input().split())
a = list(map(int,input().split()))
ans = float("inf")
 
for i in range(2**n):
    highest = a[0]
    color = 1
    money = 0
    for j in range(1,n):
        if a[j] > highest:
            color += 1
            highest = a[j]
        elif (i>>j)&1:
            color += 1
            highest = highest + 1
            money += highest - a[j]
        
    if color >= k:
        ans = min(ans,money)
print(ans)
Buggy python submission (verdict: Runtime Error):
# CODE FESTIVAL 2016 Final
# B - Exactly N points
# https://atcoder.jp/contests/cf16-final/tasks/codefestival_2016_final_b
N = int(input())
for i in range(1, N):
    if i*(i+1)//2 >= N:
        k = i
        break

S = k*(k+1)//2
sub = S-N
for i in range(1, k+1):
    if i == sub:
        continue
    print(i)


Fixed submission:
# CODE FESTIVAL 2016 Final
# B - Exactly N points
# https://atcoder.jp/contests/cf16-final/tasks/codefestival_2016_final_b
N = int(input())
for i in range(1, N+1):
    if i*(i+1)//2 >= N:
        k = i
        break


S = k*(k+1)//2
sub = S-N
for i in range(1, k+1):
    if i == sub:
        continue
    print(i)
1
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
a = list(map(int,input().split()))

ans = 1145141919810364364334
for i in range(1,2**n):
    ls = [0] * n
    qq = []
    
    for j in range(n):
        if (i >> j) & 1:
            ls[j] = 1
            qq.append(j)
            
    if sum(ls) < k:
        continue
        
    elif ls[0] == 1:
        t = []
        for j in qq:
            t.append(a[j])
        
        mt = t[0]
        cost = 0
        for j in range(len(qq) - 1) :
            if t[j+1] <= mt:
                cost += (mt + 1 - t[j+1])
                mt += 1
            else:
                mt = max(t[j+1] ,a[:qq[j+1]])
    else:
        continue
                
    ans = min(ans,cost)
    
print(ans)

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

ans = 1145141919810364364334
for i in range(1,2**n):
    ls = [0] * n
    qq = []
    
    for j in range(n):
        if (i >> j) & 1:
            ls[j] = 1
            qq.append(j)
            
    if sum(ls) < k:
        continue
        
    else:
        mt = a[0]
        cost = 0
        for j in range(1,n) :
            if mt < a[j]:
                mt = a[j]
            else:
                if ls[j] == 1:
                    cost += mt + 1 - a[j]
                    mt += 1
    ans = min(ans,cost)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
a_list = list(map(int,input().split()))

# 建物iをミられる高さにするかいなかのbit探索

ans = pow(10,100000000000)

for byte in range(pow(2,N-1)):
    height = a_list[0]
    cost = 0
    if bin(byte).count("1")>=K-1:
        for i in range(N-1):
            if not (byte & 1<<i)==0: # i番目を見る場合
                cost += max(0, height + 1 - a_list[i+1])
                height = max(height + 1, a_list[i+1])
        if cost < ans:
            ans = cost
print(ans)

Fixed submission:

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

# 建物iをミられる高さにするかいなかのbit探索

ans = 100010001000100010001000

for byte in range(pow(2,N-1)):
    height = a_list[0]
    cost = 0
    if bin(byte).count("1")>=K-1:
        for i in range(N-1):
            if not (byte & 1<<i)==0: # i番目を見る場合
                cost += max(0, height + 1 - a_list[i+1])
                height = max(height + 1, a_list[i+1])
            else:
                height = max(height,a_list[i+1])
        ans = min(ans,cost)
print(ans)
Buggy python submission (verdict: Runtime Error):
O = input()
E = input()

K = len(O)
String = ""

for i in range(K):
    
    String += O[i]
    String += E[i]

print(String)

Fixed submission:
O = input()
E = input()

K = len(E)

String = ""

for i in range(K):
    
    String += O[i]
    String += E[i]

if len(O)>len(E):
    String += O[-1]

print(String)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input()split())
if b-a==c-b:
  print('YES')
else:
  print('NO')

Fixed submission:
a,b,c=map(int,input().split())
if b-a==c-b:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
power = 1
for i in range(1,N+1):
    power = power*i

print (power%1000000007)

Fixed submission:
N = int(input())
power = 1
for i in range(1,N+1):
    power = (power*i)%1000000007
print (power)
Buggy python submission (verdict: Runtime Error):
n, m = list(map(int, input().split()))

a = []
b = []

for i in range(n):
    tmp1, tmp2 = list(map(int, input().split()))
    a.append(tmp1)
    b.append(tmp2)

c = []
d = []

for i in range(m):
    tmp1, tmp2 = list(map(int, input().split()))
    c.append(tmp1)
    d.append(tmp2)

for i in range(n):
    tmp = abs(a[n] - c[0]) + abs(b[n] - d[0])
    s = 1
    for j in range(m):
        tmp3 = abs(a[i] - c[j]) + abs(b[i] - d[j])
        if tmp3 < tmp:
            tmp = tmp3
            s = j + 1
    print(s)

Fixed submission:
tmp = input().split()
a, b = int(tmp[0]), int(tmp[1])

s = a + b

if s < 24:
    print(s)
else:
    print(s-24)
Buggy python submission (verdict: Runtime Error):
n, m = list(map(int, input().split()))

a = []
b = []

for i in range(n):
    tmp1, tmp2 = list(map(int, input().split()))
    a.append(tmp1)
    b.append(tmp2)

c = []
d = []

for i in range(m):
    tmp1, tmp2 = list(map(int, input().split()))
    c.append(tmp1)
    d.append(tmp2)

for i in range(n):
    tmp = abs(a[n] - c[0]) + abs(b[n] - d[0])
    s = 1
    for j in range(m):
        tmp3 = abs(a[i] - c[j]) + abs(b[i] - d[j])
        if tmp3 < tmp:
            tmp = tmp3
            s = j + 1
    print(s)

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

a = []
b = []

for i in range(n):
    tmp1, tmp2 = list(map(int, input().split()))
    a.append(tmp1)
    b.append(tmp2)

c = []
d = []

for i in range(m):
    tmp1, tmp2 = list(map(int, input().split()))
    c.append(tmp1)
    d.append(tmp2)

for i in range(n):
    tmp = abs(a[i] - c[0]) + abs(b[i] - d[0])
    s = 1
    for j in range(m):
        tmp3 = abs(a[i] - c[j]) + abs(b[i] - d[j])
        if tmp3 < tmp:
            tmp = tmp3
            s = j + 1
    print(s)

Buggy python submission (verdict: Runtime Error):
n,m = list(map(int, input().split()))
a=[]
b=[]
c=[]
d=[]
y=0
for i in range(n):
    tmp=list(map(int, input().split()))
    a.append(tmp[0])
    b.append(tmp[1])
for i in range(m):
    tmp=list(map(int, input().split()))
    c.append(tmp[0])
    d.append(tmp[1])
x=[1000000000]*n
for i in range(n):
    for j in range(m):
        x[j]=abs(c[j]-a[i])+abs(d[j]-b[i])
        if x[y] > x[j]:
            y = j
    print(y+1)
    y=0



Fixed submission:
n,m = list(map(int, input().split()))
a=[]
b=[]
c=[]
d=[]
y=0
for i in range(n):
    tmp=list(map(int, input().split()))
    a.append(tmp[0])
    b.append(tmp[1])
for i in range(m):
    tmp=list(map(int, input().split()))
    c.append(tmp[0])
    d.append(tmp[1])
for i in range(n):
    x=[1000000000]*m
    for j in range(m):
        x[j]=abs(c[j]-a[i])+abs(d[j]-b[i])
        if x[y] > x[j]:
            y = j
    print(y+1)
    y=0
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, raw_input().split())
print 'YES' if b - a = c - b else 'NO'

Fixed submission:
a, b, c = map(int, raw_input().split())
print 'YES' if b - a == c - b else 'NO'
Buggy python submission (verdict: Runtime Error):
import itertools
O, E = raw_input().split()
seq = []
for x, y in itertools.izip_longest(O, E):
    if x: seq.append(x)
    if y: seq.append(y)
print ''.join(seq)

Fixed submission:
import itertools
O = raw_input()
E = raw_input()
seq = []
for x, y in itertools.izip_longest(O, E):
    if x: seq.append(x)
    if y: seq.append(y)
print ''.join(seq)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

nodes, checks = [], []
for i in range(N):
    nodes.append(map(int, input().split()))
for j in range(M):
    checks.append(map(int, input().split()))

for i in range(N):
    argMin, distMin = None, float('inf')
    for j in range(M):
        dist = abs(nodes[i][0] - checks[j][0]) + abs(nodes[i][1] - checks[j][1])
        if dist < distMin: argMin, distMin = j, dist
    print(j)

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

nodes, checks = [], []
for i in range(N):
    nodes.append(list(map(int, input().split())))

for j in range(M):
    checks.append(list(map(int, input().split())))

for i in range(N):
    argMin, distMin = None, float('inf')
    for j in range(M):
        dist = abs(nodes[i][0] - checks[j][0]) + abs(nodes[i][1] - checks[j][1])
        if dist < distMin: argMin, distMin = j, dist
    print(argMin + 1)
Buggy python submission (verdict: Runtime Error):
if raw_input() == 'H': print 'H' if raw_input() == 'H' else 'D'
else: print 'H' if raw_input() == 'D' else 'D'

Fixed submission:
inp = raw_input().split()

if inp[0] == 'H': print 'H' if inp[1] == 'H' else 'D'
else: print 'H' if inp[1] == 'D' else 'D'

Buggy python submission (verdict: Runtime Error):
if raw_input() == 'H': print raw_input() == 'H'
else: print raw_input() == 'D'

Fixed submission:
inp = raw_input().split()

if inp[0] == 'H': print 'H' if inp[1] == 'H' else 'D'
else: print 'H' if inp[1] == 'D' else 'D'
Buggy python submission (verdict: Runtime Error):
d=input().split()
a=int(d[1])
b=int(d[2])
c=int(d[3])



if b-a==c-b:
    print("YES")
else:
    print("NO")

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



if b-a==c-b:
    print("YES")
else:
    print("NO")

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

if a-b==c-b:
    print("YES")
else:
    print("NO")

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



if b-a==c-b:
    print("YES")
else:
    print("NO")

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

if a-b=c-b:
    print("YES")
else:
    print("NO")

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



if b-a==c-b:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
if a-b=c-b:
    print("YES")
else:
    print("NO")

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



if b-a==c-b:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
a=list(input())
b=list(input())
d=""
for i in range(0,len(b)):
    c=a[i]+b[i]
    d=d+c
    if len(b)+1 == len(a):
        d = d+ a[len(a)]
print(d)

Fixed submission:
a=list(input())
b=list(input())
d=""
for i in range(0,len(b)):
    c=a[i]+b[i]
    d=d+c

if len(b)+1 == len(a):
    d = d+ a[len(a)-1]

print(d)

Buggy python submission (verdict: Runtime Error):


a=list(input())
b=list(input())
d=""
for i in range(0,len(a)):
    c=a[i]+b[i]
    d=d+c
print(d)

Fixed submission:
a=list(input())
b=list(input())
d=""
for i in range(0,len(b)):
    c=a[i]+b[i]
    d=d+c

if len(b)+1 == len(a):
    d = d+ a[len(a)-1]

print(d)

Buggy python submission (verdict: Runtime Error):


a=list(input())
b=list(input())
d=""
for i in range(0,len(a)):
    c=a[i]+b[i]
    d=d+c
print("d")

Fixed submission:
a=list(input())
b=list(input())
d=""
for i in range(0,len(b)):
    c=a[i]+b[i]
    d=d+c

if len(b)+1 == len(a):
    d = d+ a[len(a)-1]

print(d)

Buggy python submission (verdict: Runtime Error):
import numpy as np

a=list(input))
b=list(input))
c=[]
for i in range(0,len(a)+len(b)):
    c=np.append(c,a[i]+b[i],axis=0)
print("c")

Fixed submission:
a=list(input())
b=list(input())
d=""
for i in range(0,len(b)):
    c=a[i]+b[i]
    d=d+c

if len(b)+1 == len(a):
    d = d+ a[len(a)-1]

print(d)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, raw_input().split())
if (b-a) == (c-b):
    print("YES")
else:
    print("NO")


Fixed submission:
a, b, c = map(int, input().split())
if (b-a) == (c-b):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, raw_input().split())
2.2.if (b-a) == (c-b):
3.3.    print("YES")
4.4.else:
5.5.    print("NO")


Fixed submission:
a, b, c = map(int, input().split())
if (b-a) == (c-b):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, raw_input().split())
2.if (b-a) = (c-b):
3.    print("YES")
4.else:
5.    print("NO")


Fixed submission:
a, b, c = map(int, input().split())
if (b-a) == (c-b):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, raw_input().split())
if (b-a) or (c-b):
    print("YES")
else:
    print("NO")





Fixed submission:
a, b, c = map(int, input().split())
if (b-a) == (c-b):
    print("YES")
else:
    print("NO")