ZhenlongDai/ACPR huggingface dataset:
Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m=map(int, input().split())
a = [-1]*n
ans = 0
for i in range(m):
  s, c = map(int, input().split())
  if a[s-1]!=c and a[s-1]!=-1:
    ans = -1
    break
  elif n>1 and s==1 and c==0:
    ans = -1
    break
  else:
    a[s-1]=c
if ans == 0:
  for i in range(n):
    if a[n-1-i] != -1:
      ans += a[n-1-i]*10**i
print(ans)

Failing test case input:
2 1
0 3
2 2

Expected output:
13


Actual output:
3


Fixed submission (verdict: Accepted):
n, m=map(int, input().split())
a = [-1]*n
ans = 0
for i in range(m):
  s, c = map(int, input().split())
  if a[s-1]!=c and a[s-1]!=-1:
    ans = -1
    break
  elif n>1 and s==1 and c==0:
    ans = -1
    break
  else:
    a[s-1]=c
if m==0:
  ans=0
if ans == 0:
  if a[0]==-1:
    if n>1:
      a[0]=1
    else:
      a[0]=0
  for i in range(n):
    if a[n-1-i] != -1:
      ans += a[n-1-i]*10**i
print(ans)

Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
  
answer = [-1]*n

for i in range(m):
  s, c = map(int, input().split())
  if s == 1 and c == 0:
    if n == 1:
      print(0)
      exit()
    else:
      print(-1)
  if answer[s-1] == -1 or answer[s-1] == c:
    answer[s-1] = c
  else:
    print(-1)
    exit()

if answer[0] == -1:
  answer[0] = 1
for j in range(n):
  if answer[j] == -1:
    answer[j] = 0
    
answer = [str(x) for x in answer] 

print(int(''.join(answer)))



Failing test case input:
3 1
1 0
1 0

Expected output:
-1


Actual output:
-1
0


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
if n == 1 and m == 0:
  print(0)
  exit()
  
answer = [-1]*n

for i in range(m):
  s, c = map(int, input().split())
  if s == 1 and c == 0:
    if n == 1:
      print(0)
      exit()
    else:
      print(-1)
      exit()
  if answer[s-1] == -1 or answer[s-1] == c:
    answer[s-1] = c
  else:
    print(-1)
    exit()

if answer[0] == -1:
  answer[0] = 1
for j in range(n):
  if answer[j] == -1:
    answer[j] = 0
    
answer = [str(x) for x in answer] 

print(int(''.join(answer)))
Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
s = [list(map(int, input().split())) for _ in range(m)]
cnt = 0

for i in range(1000):
    il = len(str(i))
    if il == n:
        for j in range(m):
            if il >= j + 1:
                num = s[j][0] - 1
                k = str(i)
                if str(s[j][1]) == k[num]:
                    cnt += 1
                num = 0
        if cnt == n:
            print(i)
            exit()
        else:
            cnt = 0

print(-1)

Failing test case input:
3 0
2 1
2 0

Expected output:
100


Actual output:
-1


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
s = [list(map(int, input().split())) for _ in range(m)]
cnt = 0

if m == 0:
    if n == 1:
        print(0)
        exit()
    else:
        print(10**(n - 1))
        exit()
for i in range(1000):
    il = len(str(i))
    if il == n:
        for j in range(m):
            num = s[j][0] - 1
            k = str(i)
            if str(s[j][1]) == k[num]:
                cnt += 1
            num = 0
        if cnt == m:
            print(i)
            exit()
        else:
            cnt = 0
print(-1)

Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n , m  = map(int, input().split())
s = []
c = []
ans = [str(0) for _ in range(n)]
b = [0 for _ in range(n)]
ans[0] = "1"
for _  in range(m):
  st, ct = map(int, input().split())

  if(b[st-1] == 0 or ans[st-1] == str(ct)):
    ans[st-1] = str(ct)
    b[st-1] = 1
  else:
    print(-1)
    quit()
ans = "".join(ans)
if len(str(int(ans))) < n:
  print(-1)
else:
  print(ans)

Failing test case input:
1 0
0 0
2 3

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
n , m  = map(int, input().split())
ans = [str(0) for _ in range(n)]
b = [0 for _ in range(n)]
for _  in range(m):
  st, ct = map(int, input().split())
  if(b[st-1] == 0 or ans[st-1] == str(ct)):
    ans[st-1] = str(ct)
    b[st-1] = 1
  else:
    print(-1)
    quit()
if(b[0] == 0 and n !=1):
  ans[0] = "1"
elif(b[0] == 0):
  print(0)
  quit()
ans = "".join(ans)

if len(str(int(ans))) < n:
  print(-1)
  quit()
else:
  print(ans)
  quit()
Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = list(map(int,input().split()))
ans = [-1] * n
total = 0

if n == 1 and m == 0:
  print(0)
  
for i in range(m):
  s,c = list(map(int,input().split()))
  if ans[s-1] != -1 and ans[s-1] != c:
    print(-1)
    exit()
  
  else:
    ans[s-1] = c
  
if ans[0] == 0 and n >= 2:
  print(-1)
  exit()
  
elif ans[0] == -1:
  ans[0] = 1
  
for i in range(n):
  if ans[i] == -1:
    ans[i] = 0
    
a = 0  
for i in range(n-1, -1, -1):
  total += ans[i] * 10**a
  a += 1
  

print(total)

Failing test case input:
1 0
0 0
2 3

Expected output:
0


Actual output:
0
1


Fixed submission (verdict: Accepted):
n,m = list(map(int,input().split()))
ans = [-1] * n
total = 0
  
for i in range(m):
  s,c = list(map(int,input().split()))
  if ans[s-1] != -1 and ans[s-1] != c:
    print(-1)
    exit()
  
  else:
    ans[s-1] = c
  
if ans[0] == 0 and n >= 2:
  print(-1)
  exit()
  
elif ans[0] == -1 and n >= 2:
  ans[0] = 1
  
for i in range(n):
  if ans[i] == -1:
    ans[i] = 0
    
a = 0  
for i in range(n-1, -1, -1):
  total += ans[i] * 10**a
  a += 1

print(total)

Problem: p02761
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,M=map(int,input().split())
S=[list(map(int,input().split())) for _ in range(M)]

D=[-1]*N
ans=True

for s,c in S:
    if D[s-1] == -1:
        D[s-1]=c
    else:
        if D[s-1] != c:
            ans=False

if D[0]==0 and 1<N: ans=False
if D[0]==-1: D[0]=1

for i in range(N):
    if D[i]==-1: D[i]=0 
     
print(''.join(map(str,D)) if ans else -1)

Failing test case input:
1 0
0 0
2 3

Expected output:
0


Actual output:
1


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

D=[-1]*N
ans=True

for s,c in S:
    if D[s-1] == -1:
        D[s-1]=c
    else:
        if D[s-1] != c:
            ans=False

if D[0]==0 and 1<N: ans=False
if D[0]==-1:
    if N==1:
        D[0]=0
    else:
        D[0]=1

for i in range(N):
    if D[i]==-1: D[i]=0 
     
print(''.join(map(str,D)) if ans else -1)
Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int,input().split())
 
c = []
for i in range(m):
    c.append(list(map(int,input().split())))
 
max = 0
for i in range(m):
    if c[i][0] >= max:
        max = c[i][0]
 
ans = -1
if n == 1:
    tmp = 0
    for i in range(m):
        if c[i][1] == c[0][1]:
            tmp += 1
        if tmp == m:
            ans = c[0][1]
            break
else:            
 for i in range(pow(10,n-1),pow(10,n)):
    tmp = 0
    for j in range(m):
        if str(i)[c[j][0]-1] == str(c[j][1]):
            tmp += 1
    if tmp == m:
         ans = i
         break
print(ans) 

Failing test case input:
1 0
0 0
2 3

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
n,m = map(int,input().split())
 
c = []
for i in range(m):
    c.append(list(map(int,input().split())))
 

ans = -1
if n == 1 and m == 0:
    ans = 0
elif m == 0 and n != 1:
    ans = pow(10,n-1)
elif n == 1:
    tmp = 0
    for i in range(m):
        if c[i][1] == c[0][1]:
            tmp += 1
        if tmp == m:
            ans = c[0][1]
            break
else:            
 for i in range(pow(10,n-1),pow(10,n)):
    tmp = 0
    for j in range(m):
        if str(i)[c[j][0]-1] == str(c[j][1]):
            tmp += 1
    if tmp == m:
         ans = i
         break
print(ans)

Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    r1 = input()
    n, m = map(int, r1.split(" "))
    v = ["~"] * n
    for t in range(m):
        r = input()
        s, c = map(int, r.split(" "))
        s -= 1
        if v[s] != "~" and v[s] != str(c):
            print(-1)
            return
        v[s] = str(c)
    for x in range(len(v)):
        if v[x] == '~':
            v[x] = "0"
    sv = "".join(v)
    res = int(sv)
    res_str = str(res)
    if len(res_str) != n:
        print(-1)
        return
    print(res_str)

main()
    

Failing test case input:
2 1
2 6
2 0

Expected output:
16


Actual output:
-1


Fixed submission (verdict: Accepted):
def main():
    r1 = input()
    n, m = map(int, r1.split(" "))
    v = ["~"] * n
    for t in range(m):
        r = input()
        s, c = map(int, r.split(" "))
        s -= 1
        if v[s] != "~" and v[s] != str(c):
            print(-1)
            return
        v[s] = str(c)
    if n >= 2 and v[0] == '~':
        v[0] = "1"
    for x in range(n):
        if v[x] == '~':
            v[x] = "0"
    sv = "".join(v)
    res = int(sv)
    res_str = str(res)
    if len(res_str) != n:
        print(-1)
        return
    print(res_str)

main()
Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = list(map(int,input().split()))
ans_l = [0]*n

flag = True
for i in range(m):
    s,c, =list(map(int,input().split()))
    if n>=2:
        if s==1 and c==0:
            flag = False
            break
    if ans_l[s - 1]!=0 and ans_l[s-1]!=c:
        flag = False
        break
    ans_l[s-1]=c
if ans_l[0]==0:
    ans_l[0]=1

if flag:
    for i in ans_l:
        print("{:}".format(i),end="")
    print()
else:
    print("-1")

Failing test case input:
3 2
2 0
2 6

Expected output:
-1


Actual output:
160


Fixed submission (verdict: Accepted):
n,m = list(map(int,input().split()))
ans_l = [-1]*n

flag = True
for i in range(m):
    s,c, =list(map(int,input().split()))
    if ans_l[s-1]!=-1 and ans_l[s-1]!=c:
        flag=False
        break
    ans_l[s-1]=c

if 1<n and ans_l[0]==0:
    flag=False
if 1<n and ans_l[0]==-1:
    ans_l[0]=1
if n==1 and ans_l[0]==-1:
    ans_l[0]=0
for i in range(n):
    if ans_l[i]==-1:
        ans_l[i]=0
if flag:
    print(''.join([str(n) for n in ans_l]))
else:print(-1)

Problem: p02761
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys

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

ans = []
for _ in range(n):
    ans.append('a')

for _ in range(m):
    s, c = map(int, input().split())
    if ans[s-1] == 'a' or ans[s-1] == str(c):
        ans[s-1] = str(c)
    else:
        print(-1)
        sys.exit()

if ans[0] == '0' and len(ans) != 1:
    print(-1)
    sys.exit()
elif ans[0] == '0' and len(ans) == 1:
    print(0)
    sys.exit()

ans = ''.join(ans).replace('a', '0')

if ans[0] == '0':
    ans = ans.replace('0', '1', 1)

print(int(ans))


Failing test case input:
1 0
0 0
2 3

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
import sys

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

ans = []
for _ in range(n):
    ans.append('a')

for _ in range(m):
    s, c = map(int, input().split())
    if ans[s-1] == 'a' or ans[s-1] == str(c):
        ans[s-1] = str(c)
    else:
        print(-1)
        sys.exit()

if ans[0] == '0' and len(ans) != 1:
    print(-1)
    sys.exit()
elif len(ans) == 1:
    if ans[0] == 'a':
        print(0)
        sys.exit()
    else:
        print(int(ans[0]))
        sys.exit()

ans = ''.join(ans).replace('a', '0')

if ans[0] == '0':
    ans = ans.replace('0', '1', 1)

print(int(ans))
Problem: p02761
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
def main():
  N, M = map(int, input().split())
  num = [-1] * N

  if N == 1:
    print(0)
    return

  for _ in range(M):
    s, c = map(int, input().split())
    s -= 1
    if s == 0 and c == 0:
      print(-1)
      return
    if num[s] == -1:
      num[s] = c
    elif num[s] != c:
      print(-1)
      return

  ans = ""
  for i in range(len(num)):
    c = num[i]
    if c == -1:
      if i != 0:
        ans += "0"
      else:
        ans += "1"
    else:
      ans += str(c)

  print(ans)

main()


Failing test case input:
1 1
0 1
1 0

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
def main():
  N, M = map(int, input().split())
  num = [-1] * N

  for _ in range(M):
    s, c = map(int, input().split())
    s -= 1
    if s == 0 and c == 0:
      if N != 1:
        print(-1)
        return
    if num[s] == -1:
      num[s] = c
    elif num[s] != c:
      print(-1)
      return

  ans = ""
  for i in range(len(num)):
    c = num[i]
    if c == -1:
      if i != 0 or N == 1:
        ans += "0"
      else:
        ans += "1"
    else:
      ans += str(c)

  print(ans)

main()

Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input1 = input().split()
N = int(input1[0])
M = int(input1[1])

list = ['0' for i in range(N)]
ans = 0

for i in range(M):
  input2 = input().split()
  s = int(input2[0])
  c = int(input2[1])
  if s == 1 and c == 0:
    if N > 1:
      ans = -1
  if list[s-1] == "0" or list[s-1] == c:
    list[s-1] = c
  else:
    ans = -1

if list[0] == "0":
  if N > 1:
    list[0] == 1
  
ans2 = ""

for i in list:
  ans2 = ans2 + str(i)
  
if ans == 0:
  print(int(ans2))
else:
  print(ans)
  

Failing test case input:
3 0
1 1
0 0

Expected output:
100


Actual output:
0


Fixed submission (verdict: Accepted):
input1 = input().split()
N = int(input1[0])
M = int(input1[1])

list = ['a' for i in range(N)]
ans = 0

for i in range(M):
  input2 = input().split()
  s = int(input2[0])
  c = int(input2[1])
  if s == 1 and c == 0:
    if N > 1:
      ans = -1
  if list[s-1] == "a" or list[s-1] == c:
    list[s-1] = c
  else:
    ans = -1

if list[0] == "a":
  if N > 1:
    list[0] = 1

if N == 1 and list[0] == "a":
  list[0]=0

for i in range(N):
  if list[i] == "a":
    list[i] = 0
  
ans2 = ""

for i in list:
  ans2 = ans2 + str(i)
  
if ans == 0:
  print(int(ans2))
else:
  print(ans)
Problem: p02761
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,M=map(int,input().split())
p=True
l=[-1 for _ in range(N)]
for i in range(M):
  s,c=map(int,input().split())
  if l[s-1] == -1:
    l[s-1] = c
  elif not l[s-1]==c:
    p=False
if p:
  ans=""
  if l[0]==0:
    p=False
  elif l[0]==-1:
    if len(l)==1:
      ans="0"
    else:
      ans="1"
  else:
    ans=str(l[0])
  for i in l[1:]:
    if i == -1:
      ans+="0"
    else:
      ans+=str(i)
print(int(ans) if p else -1)
print(l)

Failing test case input:
3 3
1 7
3 2
1 1

Expected output:
-1


Actual output:
-1
[7, -1, 2]


Fixed submission (verdict: Accepted):
N,M=map(int,input().split())
p=True
l=[-1 for _ in range(N)]
for i in range(M):
  s,c=map(int,input().split())
  if l[s-1] == -1:
    l[s-1] = c
  elif not l[s-1]==c:
    p=False
if p:
  ans=""
  if len(l) == 1:
    if l[0] == -1:
      ans = "0"
    else:
      ans = str(l[0])
  elif l[0]==0:
    p=False
  elif l[0]==-1:
    ans="1"
  else:
    ans=str(l[0])
  for i in l[1:]:
    if i == -1:
      ans+="0"
    else:
      ans+=str(i)
print(int(ans) if p else -1)

Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M=map(int,input().split())
n=int(N)
m=int(M)
numlist=[]
loglist=[]
for i in range(n):
  numlist.append(0)
  loglist.append(0)
answer=0

for i in range(m):
  s,c=map(int,input().split())
  s=int(s)
  c=int(c)
  if s==1 and c==0:
    answer=-1
  elif loglist[s-1]!=0 and numlist[s-1]!=c:
    answer=-1
  else:
    numlist[s-1]=c
    loglist[s-1]=1

if answer==-1:
  print(answer)
else:
  if numlist[0]==0:
    numlist[0]=1
  else:
    pass
  for i in range(n):
    answer+=numlist[i]*10**(n-i-1)
  print(answer)

Failing test case input:
1 0
0 0
2 3

Expected output:
0


Actual output:
1


Fixed submission (verdict: Accepted):
N,M=map(int,input().split())
n=int(N)
m=int(M)
numlist=[]
loglist=[]
for i in range(n):
  numlist.append(0)
  loglist.append(0)
answer=0

for i in range(m):
  s,c=map(int,input().split())
  s=int(s)
  c=int(c)
  if s==1 and c==0 and n!=1:
    answer=-1
  elif loglist[s-1]!=0 and numlist[s-1]!=c:
    answer=-1
  else:
    numlist[s-1]=c
    loglist[s-1]=1

if answer==-1:
  print(answer)
elif n==1 and numlist[0]==0:
  print(0)
else:
  if numlist[0]==0:
    numlist[0]=1
  else:
    pass
  for i in range(n):
    answer+=numlist[i]*10**(n-i-1)
  print(answer)
Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

x,m = map(int, input().split())
s=[-1]*m
c=[-1]*m
num = [-1]*3
ans = 0
for i in range(m):
    s[i], c[i] = map(int, input().split())

for j, l in zip(s, c):
    if j == 1 and l == 0:
        print(-1)
        break
    elif num[j-1] == -1:
        num[j-1] = l
    elif num[j-1] != l:
        print(-1)
        break

    
else:
    num = list(map(lambda x: x*0 if x<0 else x, num))
    for k in num:
        ans = ans *10 + k
    print(ans)

Failing test case input:
3 0
2 0
2 3

Expected output:
100


Actual output:
0


Fixed submission (verdict: Accepted):
x,m = map(int, input().split())
s=[-1]*m
c=[-1]*m
for i in range(m):
    s[i], c[i] = map(int, input().split())
if x ==1:
    start = 0
else:
    start = 10**(x-1)

for j in range(start, 1000):
    num = str(j)
    for k1, k2 in zip(s, c):
        if num[k1-1] != str(k2):
            break
    else:  
        print(j)
        break
else:
    print(-1)

Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
lst = []
for _ in range(m):
    s, c = map(int, input().split())
    lst.append([s-1,c])
    
ans = []
for _ in range(10**(n)):
    i = 1
    nums = list(str(_))
    while len(nums) < n:
        nums.insert(0,[])
    for s in lst:
        if nums[s[0]] != str(s[1]):  
            i = 0
            break
    if i == 1:
        ans.append(_)
print(ans)
if ans:
    print(min(ans))
else:
    print(-1)

Failing test case input:
3 1
1 1
0 1

Expected output:
100


Actual output:
[100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199]
100


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
lst = []
for _ in range(m):
    s, c = map(int, input().split())
    lst.append([s-1,c])
    
ans = []
for _ in range(10**(n)):
    i = 1
    nums = list(str(_))
    while len(nums) < n:
        nums.insert(0,[])
    for s in lst:
        if nums[s[0]] != str(s[1]):  
            i = 0
            break
    if i == 1 and not [] in nums:
        ans.append(_)

if ans:
    print(min(ans))
else:
    print(-1)
Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
x = [0] * m
y = [0] * m
r = [0] * n
t = [0] * n
for i in range(m):
    x[i], y[i] = map(int, input().split())
    if t[x[i] - 1] == 0:
        r[x[i] - 1] = y[i]
        t[x[i] - 1] = 1
    else:
        if r[x[i] - 1] != y[i]:
            print(-1)
            exit()
if r[0] == 0 and t[0] == 0:
    if n == 1:
        print(0)
    elif n == 2:
        print(10)
    else:
        print(100)
else:
    print(*r, sep='')


Failing test case input:
3 1
1 0
1 0

Expected output:
-1


Actual output:
000


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
x = [0] * m
y = [0] * m
r = [0] * n
t = [0] * n
for i in range(m):
    x[i], y[i] = map(int, input().split())
    if t[x[i] - 1] == 0:
        r[x[i] - 1] = y[i]
        t[x[i] - 1] = 1
    else:
        if r[x[i] - 1] != y[i]:
            print(-1)
            exit()
if n>1 and r[0] == 0 and t[0] == 0:
    r[0] = 1
elif n > 1 and r[0] == 0 and t[0] != 0:
    print(-1)
    exit()
print(*r, sep='')

Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
sc = []
for i in range(m):
    sc.append(list(map(int, input().split())))

isExist = True
ans = [99] * n

for i in range(m):
    s = sc[i][0] - 1
    c = sc[i][1]
    if ans[s] != 99 and ans[s] != c:
        isExist = False
        break
    else:
        ans[s] = c

ans = [0 if i == 99 else i for i in ans]

if sum(ans) == 0:
    isExist = False
else:
    ans = ''.join(list(map(str, ans)))

print(ans) if isExist else print(-1)


Failing test case input:
3 2
-1 1
0 2

Expected output:
112


Actual output:
012


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

ans = [-1] * n
flag = True

for i in range(m):
    s, c = map(int, input().split())
    if ans[s - 1] == -1:
        ans[s - 1] = c
    elif ans[s - 1] != c:
        flag = False
        break

if n > 1 and ans[0] == 0:
    flag = False

if not flag:
    print(-1)
    exit()

ans = [0 if i == -1 else i for i in ans]
if n > 1 and ans[0] == 0:
    ans[0] = 1
ans = ''.join(map(str, ans))
print(ans)
Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = list(map(int, input().split()))

numlist = ['-'] * N
for m in range(M):
    s, c = list(map(int, input().split()))
    if numlist[s - 1] == '-':
        numlist[s - 1] = c
    else:
        numlist[s - 1] = c if c <= numlist[s - 1] else numlist[s - 1]


if numlist[0] == '-' or numlist[0] == 0:
    if N == 1 and numlist[0] == 0:
        answer = 0
    else:
        answer = -1
else:
    strlist = []
    for num in numlist:
        num = 0 if num == '-' else num
        strlist.append(str(num))
    answer = ''.join(strlist)
print(answer)


Failing test case input:
3 0
2 0
2 3

Expected output:
100


Actual output:
-1


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

numlist = [-1] * N
exist = True
for m in range(M):
    s, c = list(map(int, input().split()))
    if numlist[s - 1] == -1:
        numlist[s - 1] = c
    else:
        if numlist[s - 1] != c:
            exist = False
            break

if numlist[0] == 0 and len(numlist) > 1:
    exist = False
elif numlist[0] == -1 and len(numlist) > 1:
    numlist[0] = 1
elif numlist[0] == -1 and len(numlist) == 1:
    numlist[0] = 0
if exist:
    ans = [0 if i == -1 else i for i in numlist]
    print(''.join([str(i) for i in ans]))
else:
    print(-1)

Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def convert(s): 
  
    
    new = "" 
  
    
    for x in s: 
        new += x  
  
    
    return new 

n,m=map(int,input().split())
a=[]
for i in range(n):
  a.append(0)
b=[]
if n==1:
  b.append(0)
else:
  b.append(1)
  a[0]=1
  for i in range(n-1):
    b.append(0)
fail=0
for i in range(m):
  s,c=map(int,input().split())
  if c!= b[s-1] and a[s-1]==1:
    fail=1
    break
  b[s-1]=c
  a[s-1]=1
for i in range(n):
  b[i]=str(b[i])
if fail==1:
  print(-1)
else:
  print(convert(b))
    
    
      

Failing test case input:
2 1
1 3
2 0

Expected output:
30


Actual output:
-1


Fixed submission (verdict: Accepted):
def convert(s): 
  
    
    new = "" 
  
    
    for x in s: 
        new += x  
  
    
    return new 

n,m=map(int,input().split())
a=[]
for i in range(n):
  a.append(0)
b=[]
if n==1:
  b.append(0)
else:
  b.append(1)
  for i in range(n-1):
    b.append(0)
fail=0
for i in range(m):
  s,c=map(int,input().split())
  if c!= b[s-1] and a[s-1]==1:
    fail=1
    break
  b[s-1]=c
  a[s-1]=1
if n>1 and b[0]==0:
  fail=1
for i in range(n):
  b[i]=str(b[i])

if fail==1:
  print(-1)
else:
  print(convert(b))
Problem: p02761
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import math
n,m=map(int,input().split())
ans=['l']*n
flag=False
for i in range(m):
    s,c=map(int,input().split())
    if ans[s-1]=='l':
      ans[s-1]=c
    else:
        if ans[s-1]!=c:
            print(-1)
            exit(0)
    if s-1==0:
        flag=True

if not flag:
    ans[0]=1
if ans[0]==0 and n>1:
    print(-1)
else:
    for i in ans:
        print(i,end="")
print()


Failing test case input:
3 1
1 1
2 2

Expected output:
100


Actual output:
1ll


Fixed submission (verdict: Accepted):

import math
n,m=map(int,input().split())
ans=['l']*n
for i in range(m):
    s,c=map(int,input().split())
    if ans[s-1]=='l':
      ans[s-1]=c
    else:
        if ans[s-1]!=c:
            print(-1)
            exit(0)
if ans[0]=='l' and n>1:
    ans[0]=1
for i in range(n):
    if ans[i]=='l':
        ans[i]=0
if ans[0]==0 and n>1:
    print(-1)
else:
    for i in ans:
        print(i,end="")
print()
Problem: p02946
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k, x = map(int, input().split())
a = x-k+1
b = x+k-1
print(i for i in range(a, b+1))

Failing test case input:
9 61

Expected output:
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69


Actual output:
<generator object <genexpr> at 0x7fe601490110>


Fixed submission (verdict: Accepted):
k, x = map(int, input().split())
a = x-k+1
b = x+k-1
print(' '.join(list(map(str, range(a, b+1)))))

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X,K = map(int, input().split())
max = X + K 
min = X - K + 1
for i in range(min,max):
    print(i,end=" ")

Failing test case input:
5 27

Expected output:
23 24 25 26 27 28 29 30 31


Actual output:
-21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 

Fixed submission (verdict: Accepted):
K,X = map(int, input().split())
max = X + K 
min = X - K + 1
for i in range(min,max):
    print(i,end=" ")

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K,X = map(int,input().split())

[print(i,end=' ')for i in range(K-X+1,K+X)]




Failing test case input:
9 63

Expected output:
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71


Actual output:
-53 -52 -51 -50 -49 -48 -47 -46 -45 -44 -43 -42 -41 -40 -39 -38 -37 -36 -35 -34 -33 -32 -31 -30 -29 -28 -27 -26 -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 

Fixed submission (verdict: Accepted):
K,X = map(int,input().split())

[print(i,end=' ')for i in range(X-K+1,X+K)]

Problem: p02946
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
k, x = map(int, input().split())
list = []
for i in range(0, k):
    list.append(x-i)
for j in range(0, k):
    list.append(x+j)
list.sort()
list.remove(x)
print(list)

Failing test case input:
16 27

Expected output:
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42


Actual output:
[12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42]


Fixed submission (verdict: Accepted):
k, x = map(int, input().split())
list = []
for i in range(0, k):
    list.append(x-i)
for j in range(0, k):
    list.append(x+j)
list.sort()
list.remove(x)

print(' '.join(map(str,list)))

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,x = [int(x) for x in input().split()]
[i for i in range(x - k + 1,x + k)]

Failing test case input:
5 27

Expected output:
23 24 25 26 27 28 29 30 31


Actual output:

Fixed submission (verdict: Accepted):
k,x = [int(x) for x in input().split()]
print(' '.join([str(i) for i in range(x - k + 1,x + k)]))
Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input_num=input().split()
input_num=[int(num) for num in input_num]

K=input_num[0]
X=input_num[1]

min_cons=-10**6
max_cons=10**6

max_num=X+K-1
min_num=X-(K-1)

if min_num<min_cons:
    min_num=min_cons

if max_num>max_cons:
    max_num=max_cons

num_list=[i for i in range(min_num,max_num+1)]

print(num_list)



Failing test case input:
14 63

Expected output:
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76


Actual output:
[50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76]


Fixed submission (verdict: Accepted):
input_num=input().split()
input_num=[int(num) for num in input_num]

K=input_num[0]
X=input_num[1]

min_cons=-10**6
max_cons=10**6

max_num=X+K-1
min_num=X-(K-1)

if min_num<min_cons:
    min_num=min_cons

if max_num>max_cons:
    max_num=max_cons

num_list=[i for i in range(min_num,max_num+1)]
print(*num_list)

Problem: p02946
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k, x = map(int, input().split())
','.join([str(i) for i in range(x-k+1, x+k-1+1)]).replace(',', ' ')

Failing test case input:
5 35

Expected output:
31 32 33 34 35 36 37 38 39


Actual output:

Fixed submission (verdict: Accepted):
k, x = map(int, input().split())
ans = [i for i in range(x-k+1, x+k-1+1)]
print(*ans)

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K, X = map(int, input().split())
for x in range(X-K+1,X+K-1):
  print(x, end=" ")

Failing test case input:
5 27

Expected output:
23 24 25 26 27 28 29 30 31


Actual output:
23 24 25 26 27 28 29 30 

Fixed submission (verdict: Accepted):
K, X = map(int, input().split())
for x in range(X-K+1,X+K):
  print(x, end=" ")

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
int = list(map(int,input().split()))

k = int[0]
x = int[1]

print(range(x + 1 - k,x + k))


Failing test case input:
13 10

Expected output:
-2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


Actual output:
range(-2, 23)


Fixed submission (verdict: Accepted):
int = list(map(int,input().split()))

k = int[0]
x = int[1]

p=x + 1 
q=p - k
r=x + k

s =list(range(q,r))
print(*s)

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K, N = map(int, input().split())
L = [v for v in range(N - K, N, 1)]
R = [v for v in range(N, N+K, 1)]
L.extend(R)
print(sorted(L))


Failing test case input:
7 010

Expected output:
4 5 6 7 8 9 10 11 12 13 14 15 16


Actual output:
[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]


Fixed submission (verdict: Accepted):
K, N = map(int, input().split())
L = [v for v in range(N - K + 1, N, 1)]
R = [v for v in range(N, N+K, 1)]
L.extend(R)
set(L)
LLL = sorted(list(L))
print(" ".join(list(map(str, LLL))))
Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,x=map(int,input().split())
for i in range(x-k+1,x+k):
  print(i,end="")

Failing test case input:
9 85

Expected output:
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93


Actual output:
7778798081828384858687888990919293

Fixed submission (verdict: Accepted):
k,x=map(int,input().split())
for i in range(x-k+1,x+k):
  print("%d "%i ,end="")

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k, x = map(int,input().split())
print(''.join(map(str, range(x-k+1, x+k))))


Failing test case input:
9 46

Expected output:
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54


Actual output:
3839404142434445464748495051525354


Fixed submission (verdict: Accepted):
k, x = map(int,input().split())
print(' '.join(map(str, range(x-k+1, x+k))))

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,x = map(int, input().split())
print(*range(k-x+1, k+x))

Failing test case input:
9 85

Expected output:
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93


Actual output:
-75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 -56 -55 -54 -53 -52 -51 -50 -49 -48 -47 -46 -45 -44 -43 -42 -41 -40 -39 -38 -37 -36 -35 -34 -33 -32 -31 -30 -29 -28 -27 -26 -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93


Fixed submission (verdict: Accepted):
k,x = map(int, input().split())
print(*range(x-k+1, k+x))

Problem: p02946
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
K, X = map(int, input().split())
ans = [str(i) for i in range(X-K+1, X+K)]

print((',').join(ans))

Failing test case input:
9 85

Expected output:
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93


Actual output:
77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93


Fixed submission (verdict: Accepted):
K, X = map(int, input().split())
ans = [str(i) for i in range(X-K+1, X+K)]
print((' ').join(ans))

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,x = (int(i) for i in input().split())

mini = x - k + 1
maxi = x + k - 1

l = list(range(max([mini,-1000000]),min([1000000,maxi])))
if not l:
  print(x)
else:
  print(l)

Failing test case input:
16 16

Expected output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31


Actual output:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]


Fixed submission (verdict: Accepted):
k,x = (int(i) for i in input().split())

mini = x - k + 1
maxi = x + k

l = list(range(max([mini,-1000000]),min([1000000,maxi])))
if not l:
  print(x)
else:
  for a in range(len(l)):
    print(l[a],end=" ")
Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int,input().split()))
ans = ""
kaisu = a[0] * 2 +1
for i in range(kaisu):
    b = a[1] - a[0] + 1 + i
    ans = ans + str(b) + " "
print(ans[:-1])

Failing test case input:
16 27

Expected output:
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42


Actual output:
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))
ans = ""
kaisu = a[0] * 2 - 1
for i in range(kaisu):
    b = a[1] - a[0] + 1 + i
    ans = ans + str(b) + " "
print(ans[:-1])

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k, x = list(map(int, input().split()))

a = []

for i in range(k):
  a.append(x - i)
  a.append(x + i)

s_a = sorted(a)
print(s_a)

Failing test case input:
9 61

Expected output:
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69


Actual output:
[53, 54, 55, 56, 57, 58, 59, 60, 61, 61, 62, 63, 64, 65, 66, 67, 68, 69]


Fixed submission (verdict: Accepted):
k, x = list(map(int, input().split()))

a = []

for i in range(k):
  a.append(x - i)

for i in range(1, k):
  a.append(x + i)

s_a = sorted(a)

for s in s_a:
  print(s, end =" ")

Problem: p02946
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k,x = map(int,input().split())
ans = [i for i in range(k-abs(x)+1,k+abs(x))]
for i in ans:
  if -1000000 <= i <= 1000000:
    print(i,end='')


Failing test case input:
9 85

Expected output:
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93


Actual output:
-75-74-73-72-71-70-69-68-67-66-65-64-63-62-61-60-59-58-57-56-55-54-53-52-51-50-49-48-47-46-45-44-43-42-41-40-39-38-37-36-35-34-33-32-31-30-29-28-27-26-25-24-23-22-21-20-19-18-17-16-15-14-13-12-11-10-9-8-7-6-5-4-3-2-10123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293

Fixed submission (verdict: Accepted):
k,x = map(int,input().split())
ans = [i for i in range(abs(x)-k+1,abs(x)+k)]
for i in ans:
  if -1000000 <= i <= 1000000:
    print(i,'',end='')

Problem: p02946
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
p = list(map(int, input().split()))
ans  = list(range(p[1]-p[0]+1, p[1]+p[0]))
print(ans)

Failing test case input:
5 35

Expected output:
31 32 33 34 35 36 37 38 39


Actual output:
[31, 32, 33, 34, 35, 36, 37, 38, 39]


Fixed submission (verdict: Accepted):
p = list(map(int, input().split()))
ans  = list(range(p[1]-p[0]+1, p[1]+p[0]))
print(*ans)

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K, X = map(int,input().split())

LX = []
for i in range(X-K+1, X+K):
    LX.append(i)

print(LX)

Failing test case input:
9 61

Expected output:
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69


Actual output:
[53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69]


Fixed submission (verdict: Accepted):
K, X = map(int,input().split())

LX = []
for i in range(X-K+1, X+K):
    LX.append(i)

print(" ".join(map(str, LX)))
Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int, input().split())

c = b + a - 1
d = b - a + 1

n_list = []

if c == d:
    print(c)
elif c != d:
    max_n = max(c,d)
    min_n = min(c,d)
    for i in range(min_n, max_n+1):
        n_list.append(i)

print(n_list)

Failing test case input:
9 35

Expected output:
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


Actual output:
[27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43]


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

c = b + a - 1
d = b - a + 1

n_list = []

if c == d:
    print(c)
elif c != d:
    max_n = max(c,d)
    min_n = min(c,d)
    for i in range(min_n, max_n+1):
        n_list.append(i)
    


print( " ".join( repr(e) for e in n_list ) )

Problem: p02946
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,A = map(int,input().split())
N = N-1
for i in range(A-N,A+N+1):
  print(i,end="")

Failing test case input:
16 27

Expected output:
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42


Actual output:
12131415161718192021222324252627282930313233343536373839404142

Fixed submission (verdict: Accepted):
N,A = map(int,input().split())
N = N-1
for i in range(A-N,A+N+1):
  print(i,"",end="")

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = list(map(int, input().split()))
if n==1:
  print(m)
else:
  ans = [m]
  for i in range(n-1):
    ans.append(m-(n-i)+1)
    ans.append(m+i+1)
  print(ans)


Failing test case input:
4 59

Expected output:
56 57 58 59 60 61 62


Actual output:
[59, 56, 60, 57, 61, 58, 62]


Fixed submission (verdict: Accepted):
n,m = list(map(int, input().split()))
if n==1:
  print(m)
else:
  ans = [m]
  for i in range(n-1):
    ans.append(m-(n-i)+1)
    ans.append(m+i+1)
  ans.sort()
  print(' '.join(map(str, ans)))

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,x = map(int,input().split())
print(i for i in range(int(x-k+1),int(x+k)))

Failing test case input:
15 17

Expected output:
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31


Actual output:
<generator object <genexpr> at 0x7f748e874110>


Fixed submission (verdict: Accepted):
k,x = map(int,input().split())
print(*[i for i in range(x-k+1,x+k)])

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k, x = map(int, input().split())
lis = []
for i in range(k):
  lis.append(x+i)
  lis.append(x-i)
lis.sort()
for i in lis:
  print(i,end=' ')

Failing test case input:
9 35

Expected output:
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


Actual output:
27 28 29 30 31 32 33 34 35 35 36 37 38 39 40 41 42 43 

Fixed submission (verdict: Accepted):
k, x = map(int, input().split())
lis = []
for i in range(k):
  lis.append(x+i)
  lis.append(x-i)
set_lis = set(lis)
for i in sorted(list(set_lis)):
  print(i,end=' ')
Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,x = map(int,input().split())

lst = []
for i in range(0,k):
  lst.append(x+i)
  lst.append(x-i)

lst = list(set(lst))

lst = ([i for i in lst if i  <= 1000000 and i >= -1000000])
print(' '.join(map(str,lst)))


Failing test case input:
5 35

Expected output:
31 32 33 34 35 36 37 38 39


Actual output:
32 33 34 35 36 37 38 39 31


Fixed submission (verdict: Accepted):
k,x = map(int,input().split())

lst = []
for i in range(0,k):
  lst.append(x+i)
  lst.append(x-i)

lst = list(set(lst))

lst = ([i for i in lst if i  <= 1000000 and i >= -1000000])
print(' '.join(map(str,sorted(lst))))

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
for i in range(2*a-1):
  print(b-a+1,end="")

Failing test case input:
9 35

Expected output:
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


Actual output:
2727272727272727272727272727272727

Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
for i in range(2*a-1):
  print(b-a+1+i,end=" ")

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k, x=map(int,input().split())
for i in range(x-(k-1), x+(k-1)):
	print(i, end=" ") 

Failing test case input:
9 61

Expected output:
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69


Actual output:
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 

Fixed submission (verdict: Accepted):
k, x=map(int, input().split())
if k ==1:
	print(x)
else:
	for i in range(x-(k-1),x+k):
		print(i, end=" ")

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X, K = map(int, input().split())
lis = list()

if X == 1:
    lis.append(K)
else:
    for i in range(K - X +1,K + X -1):
        lis.append(i)

for j in lis:
    print(j,end=" ")

Failing test case input:
4 59

Expected output:
56 57 58 59 60 61 62


Actual output:
56 57 58 59 60 61 

Fixed submission (verdict: Accepted):
X, K = map(int, input().split())

if X == 1:
    print(K)
else:
    for i in range(K - X +1,K + X):
        print(i,end=" ")

Problem: p02946
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
k, x = map(int, input().split())

l = [x]
for i in range(1, k):
    l.append(x - i)
    l.append(x + i)
l.sort()
print(l)

Failing test case input:
11 63

Expected output:
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73


Actual output:
[53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73]


Fixed submission (verdict: Accepted):
k, x = map(int, input().split())

l = [x]
for i in range(1, k):
    l.append(x - i)
    l.append(x + i)
l.sort()
print(*l)

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,x = map(int,input().split())
print(list(range(x-k+1,x+k)))


Failing test case input:
16 16

Expected output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31


Actual output:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]


Fixed submission (verdict: Accepted):
k,x = map(int,input().split())
print(*list(range(x-k+1,x+k)))
Problem: p02946
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
K, X = map(int, input().split())
M = X - K + 1
ans = []
for i in range((2 * K) - 1):
  if M + i >= -1000000:
    if M + i <= 1000000:
        ans.append(M + i)
print(str(ans))

Failing test case input:
9 63

Expected output:
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71


Actual output:
[55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71]


Fixed submission (verdict: Accepted):
K, X = map(int, input().split())
M = X - K + 1
ans = []
for i in range((2 * K) - 1):
  if M + i >= -1000000:
    if M + i <= 1000000:
        print(M + i, end = ' ')

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k,x=map(int,input().split())
d=[]
for i in range((k-1)*2+1):
  d.append(x-k+1+i)
print(d)

Failing test case input:
13 10

Expected output:
-2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


Actual output:
[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]


Fixed submission (verdict: Accepted):
k,x=map(int,input().split())
d=[]
for i in range((k-1)*2+1):
  d.append(x-k+1+i)
print(*d)

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
kx = list(map(int, input().split()))

k = kx[0]
x = kx[1]
ans = [i for i in range(x-k+1, x+k, 1) if (1000000 >= i) and (i >= -1000000) ]

for a in ans:
    print(a, end ="")

Failing test case input:
16 16

Expected output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31


Actual output:
12345678910111213141516171819202122232425262728293031

Fixed submission (verdict: Accepted):
kx = list(map(int, input().split()))
 
k = kx[0]
x = kx[1]
ans = [i for i in range(x-k+1, x+k, 1) if (1000000 >= i) and (i >= -1000000) ]
 
for a in ans:
    print(a, end =" ")

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
K, X = map(int, input().split())

ans = ''
for i in range(max(0,X-K)+1,X+K):
  ans += str(i) + ' '

print(ans)

Failing test case input:
13 10

Expected output:
-2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


Actual output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 


Fixed submission (verdict: Accepted):
K, X = map(int, input().split())

ans = ''
for i in range(X-K+1,X+K):
  ans += str(i) + ' '

print(ans)
Problem: p02946
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
K,X=list(map(int,input().split()))
Min = max(X - (K -1),-1000000)
Max = min(X + (K-1),1000000)
ans = []
for i in range(Min,Max+1):
    ans.append(i)
x = ' '.join(str(ans))
print(x)

Failing test case input:
16 27

Expected output:
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42


Actual output:
[ 1 2 ,   1 3 ,   1 4 ,   1 5 ,   1 6 ,   1 7 ,   1 8 ,   1 9 ,   2 0 ,   2 1 ,   2 2 ,   2 3 ,   2 4 ,   2 5 ,   2 6 ,   2 7 ,   2 8 ,   2 9 ,   3 0 ,   3 1 ,   3 2 ,   3 3 ,   3 4 ,   3 5 ,   3 6 ,   3 7 ,   3 8 ,   3 9 ,   4 0 ,   4 1 ,   4 2 ]


Fixed submission (verdict: Accepted):
K,X=list(map(int,input().split()))
Min = max(X - (K -1),-1000000)
Max = min(X + (K-1),1000000)
ans = []
for i in range(Min,Max+1):
    ans.append(i)
ans = map(str,ans)
ans = ' '.join(ans)
print(ans)

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num=input()
K,X=[int(s) for s in num.split(" ")]

max=X+(K-1)
min=X-(K-1)

list=[]
for i in range(min,max+1,1):
    list.append(i)

print(list)


Failing test case input:
7 010

Expected output:
4 5 6 7 8 9 10 11 12 13 14 15 16


Actual output:
[4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]


Fixed submission (verdict: Accepted):
num=input()
K,X=[int(s) for s in num.split(" ")]

max=X+(K-1)
min=X-(K-1)

list=[]
for i in range(min,max+1,1):
    list.append(i)

ans=" ".join(map(str,list))

print(ans)

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
point = [int(i) for i in input().split()] 
point_list = []
for i in range(1,point[0]*2):
    print(i)
    tmp = point[1] - point[0] + i
    point_list.append(tmp)
print(*point_list)

Failing test case input:
7 010

Expected output:
4 5 6 7 8 9 10 11 12 13 14 15 16


Actual output:
1
2
3
4
5
6
7
8
9
10
11
12
13
4 5 6 7 8 9 10 11 12 13 14 15 16


Fixed submission (verdict: Accepted):
point = [int(i) for i in input().split()] 
point_list = []
for i in range(1,point[0]*2):
    tmp = point[1] - point[0] + i
    point_list.append(tmp)
print(*point_list)

Problem: p02946
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

k,x = map(int, input().split())

mn = max(x - k+1, -20000)
mx = min(x + k-1, 20000)
res = [i for i in range(mn, mx+1)]
print(res)

Failing test case input:
7 010

Expected output:
4 5 6 7 8 9 10 11 12 13 14 15 16


Actual output:
[4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]


Fixed submission (verdict: Accepted):

k,x = map(int, input().split())

mn = max(x - k+1, -20000)
mx = min(x + k-1, 20000)
res = [str(i) for i in range(mn, mx+1)]
print(' '.join(res))