Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p02641
x,n = map(int,input().split()) if n == 0: print (x) exit () p = list(map(int,input().split())) for i in range(1,201): if not x-i in p: print (x-i) exit () elif not x+i in p: print (x+i) exit ()
x,n = map(int,input().split()) if n == 0: print (x) exit () p = list(map(int,input().split())) for i in range(201): if not x-i in p: print (x-i) exit () elif not x+i in p: print (x+i) exit () else: pass
[ "call.arguments.change", "control_flow.pass.add" ]
357,855
357,856
u422272120
python
p02641
X, N = map(int,input().split()) answer = 0 if N != 0: mapped_list = map(int,input().split()) list = list(mapped_list) print(list) for i in range (N): if (X-i in list) == False: answer = X-i break elif (X+i in list) == False: answer = X+i break else: answer = X print(answer)
X, N = map(int,input().split()) answer = 0 if N != 0: mapped_list = map(int,input().split()) list = list(mapped_list) for i in range (N): if (X-i in list) == False: answer = X-i break elif (X+i in list) == False: answer = X+i break else: answer =X print(answer)
[ "call.remove" ]
357,861
357,862
u938933689
python
p02641
X,N = map(int,input().split(" ")) if N != 0: p_list = list(map(int,input().split(" "))) target = X target_num_min = X target_num_plus = X if X in p_list: while True: target_num_min -= 1 if target_num_min not in p_list: target = target_num_min break target_num_plus...
X,N = map(int,input().split(" ")) target = X if N != 0: p_list = list(map(int,input().split(" "))) target_num_min = X target_num_plus = X if X in p_list: while True: target_num_min -= 1 if target_num_min not in p_list: target = target_num_min ...
[ "assignment.add", "assignment.remove" ]
357,871
357,872
u294490207
python
p02641
k = list(map(int, input().split())) if k[1] == 0: print(k[0]) else: l = list(map(int, input().split())) a = [i for i in range(-10,101) if not i in l] m = [] for i in a: m.append(abs(i - k[0])) print(a[m.index(min(m))])
k = list(map(int, input().split())) if k[1] == 0: print(k[0]) else: l = list(map(int, input().split())) a = [i for i in range(102) if not i in l] m = [] for i in a: m.append(abs(i - k[0])) print(a[m.index(min(m))])
[ "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
357,898
357,899
u672370694
python
p02641
k = list(map(int, input().split())) if k[1] == 0: print(k[0]) else: l = list(map(int, input().split())) a = [i for i in range(101) if not i in l] m = [] for i in a: m.append(abs(i - k[0])) print(a[m.index(min(m))])
k = list(map(int, input().split())) if k[1] == 0: print(k[0]) else: l = list(map(int, input().split())) a = [i for i in range(102) if not i in l] m = [] for i in a: m.append(abs(i - k[0])) print(a[m.index(min(m))])
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
357,901
357,899
u672370694
python
p02641
if __name__=="__main__": # Problem C X, N = map(int, (input().split(' '))) if N > 0: P = map(int, input().split(' ')) P_max = max(P) P_min = min(P) if X in P: for i in range(0, 100): if (X-i) not in P: print(X-i) ...
if __name__=="__main__": # Problem C X, N = map(int, (input().split(' '))) if N > 0: P = sorted(map(int, input().split(' '))) P_max = max(P) P_min = min(P) if X in P: for i in range(100): if (X-i) not in P: print(X-i) ...
[ "call.add", "call.arguments.change" ]
357,902
357,903
u701893485
python
p02641
# 初期入力 import sys input = sys.stdin.readline X,N = (int(i) for i in input().split()) if N !=0: p = list(map(int, input().split())) elif N ==0: p=[-1] p.sort() # ans =[] for i in range(-1,101): if i not in p: ans.append((abs(i-X),i)) ans.sort() print(ans[0][1])
# 初期入力 import sys input = sys.stdin.readline X,N = (int(i) for i in input().split()) if N !=0: p = list(map(int, input().split())) elif N ==0: p=[-1] p.sort() # ans =[] for i in range(-1,102): if i not in p: ans.append((abs(i-X),i)) ans.sort() print(ans[0][1])
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
357,910
357,911
u116038906
python
p02641
import sys x, n = map(int, input().split()) if n == 0: print(x) sys.exit() else: p = list(map(int, input().split())) a = [] b = [] for i in range(0, 101): if i not in p: a.append((x - i)**2) b.append(i) ans = min(a) bb = a.index(ans) print(b[bb])
import sys x, n = map(int, input().split()) if n == 0: print(x) sys.exit() else: p = list(map(int, input().split())) a = [] b = [] for i in range(0, 102): if i not in p: a.append((x - i)**2) b.append(i) ans = min(a) bb = a.index(ans) print(b[bb])
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
357,963
357,964
u434966508
python
p02641
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines x, n = map(int, readline().split()) p = set(map(int, readline().split())) ans = x tmp = 10 ** 9 for i in reversed(range(-1, 101)): if i not in p: if tmp >= abs(x - i): tmp = abs...
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines x, n = map(int, readline().split()) p = set(map(int, readline().split())) ans = x tmp = 300 for i in reversed(range(-1, 102)): if i not in p: if tmp >= abs(x - i): tmp = abs(x -...
[ "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change", "expression.operation.binary.remove", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
357,978
357,979
u062484507
python
p02641
tmp = list(map(int, input().split())) x = tmp[0] n = tmp[1] if n == 0: print(x) exit() p = list(map(int, input().split())) i = 1 while True: if not x-i in p: print(x-i) break if not x+i in p: print(x+i) break i += 1
tmp = list(map(int, input().split())) x = tmp[0] n = tmp[1] if n == 0: print(x) exit() p = list(map(int, input().split())) i = 0 while True: if not x-i in p: print(x-i) break if not x+i in p: print(x+i) break i += 1
[ "literal.number.integer.change", "assignment.value.change" ]
358,025
358,026
u298732574
python
p02641
x,n = map(int,input().split()) if n != 0: p = list(map(int,input().split())) else: print(x) exit() s = 1000000000 for i in range(-101,101): if i in p: continue s = min(abs(x-i),s) if not x-s in p: print(x - s) else: print(x + s)
x,n = map(int,input().split()) if n != 0: p = list(map(int,input().split())) else: print(x) exit() s = 1000000000 for i in range(-100,102): if i in p: continue s = min(abs(x-i),s) if not x-s in p: print(x - s) else: print(x + s)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,028
358,029
u203383537
python
p02641
X, N = map(int, input().split()) if N == 0: print(X) else: P = list(map(int, input().split())) for i in range(1,1000): if (X-i) not in P: print(X-i) break elif (X+i) not in P: print(X+i) break
X, N = map(int, input().split()) if N == 0: print(X) else: P = list(map(int, input().split())) for i in range(1000): if (X-i) not in P: print(X-i) break elif (X+i) not in P: print(X+i) break
[ "call.arguments.change" ]
358,045
358,046
u299599133
python
p02641
X, N = map(int,input().split()) if N == 0: print(X) exit() else: P = list(map(int,input().split())) L = [i for i in range(0,101) if i not in P] if X in L: ANS = X else: L.append(X) L = sorted(L) n = L.index(X) l = len(L) - 1 if (0 < n < l): if (L[n+1]-L[n] < L[n] - L[n-1])...
X, N = map(int,input().split()) if N == 0: print(X) exit() else: P = list(map(int,input().split())) L = [i for i in range(0,102) if i not in P] if X in L: ANS = X else: L.append(X) L = sorted(L) n = L.index(X) l = len(L) - 1 if (0 < n < l): if (L[n+1]-L[n] < L[n] - L[n-1])...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,047
358,048
u556657484
python
p02641
x, n = map(int,input().split()) if n != 0: p = list(map(int,input().split())) p_change = [] m = 0 if n == 0: print(x) else: for i in p: p_change.append(abs(i-x)) if x in p: for i in range(n): if i != 0 and p_change.count(i) != 2: m = i break ...
x, n = map(int,input().split()) if n != 0: p = list(map(int,input().split())) p_change = [] m = 0 if n == 0: print(x) else: for i in p: p_change.append(abs(i-x)) if x in p: for i in range(n+1): if i != 0 and p_change.count(i) != 2: m = i break ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
358,083
358,081
u271064067
python
p02641
import math def main(): x, n = map(int, input().split()) if n==0: out = x else: p_l = [int(_) for _ in input().split()] c_l = [] for i in range(-101, 101): c_l.append(i) for p in p_l: if p in c_l: c_l[c_l.index(p)]=100...
import math def main(): x, n = map(int, input().split()) if n==0: out = x else: p_l = [int(_) for _ in input().split()] c_l = [] for i in range(-101, 105): c_l.append(i) for p in p_l: if p in c_l: c_l[c_l.index(p)]=100...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,087
358,088
u571395477
python
p02641
import math def main(): x, n = map(int, input().split()) if n==0: out = x else: p_l = [int(_) for _ in input().split()] c_l = [] for i in range(-101, 101): c_l.append(i) for p in p_l: if p in c_l: c_l[c_l.index(p)]=100...
import math def main(): x, n = map(int, input().split()) if n==0: out = x else: p_l = [int(_) for _ in input().split()] c_l = [] for i in range(-101, 105): c_l.append(i) for p in p_l: if p in c_l: c_l[c_l.index(p)]=100...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "assignment.value.change" ]
358,089
358,088
u571395477
python
p02641
import math def main(): x, n = map(int, input().split()) if n==0: out = x else: p_l = [int(_) for _ in input().split()] c_l = [] for i in range(-100, 100): c_l.append(i) for p in p_l: if p in c_l: c_l[c_l.index(p)]=100...
import math def main(): x, n = map(int, input().split()) if n==0: out = x else: p_l = [int(_) for _ in input().split()] c_l = [] for i in range(-101, 105): c_l.append(i) for p in p_l: if p in c_l: c_l[c_l.index(p)]=100...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "assignment.value.change" ]
358,090
358,088
u571395477
python
p02641
X, N = map(int, input().split()) try: list_ = list(map(int, input().split())) except: print(X) else: for i in range(1, 101): if not (X-i) in list_: print(X-i) break elif not(X+i) in list_: print(X+i) break
X, N = map(int, input().split()) try: list_ = list(map(int, input().split())) except: print(X) else: for i in range(0, 101): if not (X-i) in list_: print(X-i) break elif not(X+i) in list_: print(X+i) break
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change" ]
358,108
358,109
u552533086
python
p02641
from sys import stdin, stdout import sys INF=1e9 import bisect def get_int(): return int(stdin.readline().strip()) def get_ints(): return map(int,stdin.readline().strip().split()) def get_array(): return list(map(int,stdin.readline().strip().split())) def get_string(): return stdin.readline().strip() def op(c): return...
from sys import stdin, stdout import sys INF=1e9 import bisect def get_int(): return int(stdin.readline().strip()) def get_ints(): return map(int,stdin.readline().strip().split()) def get_array(): return list(map(int,stdin.readline().strip().split())) def get_string(): return stdin.readline().strip() def op(c): return...
[ "call.arguments.change", "call.arguments.add" ]
358,119
358,120
u242316925
python
p02641
import numpy as np X, N = list(map(int, input().split())) try: p = np.array(list(map(int, input().split()))) except EOFError: print(X) exit() I = np.arange(1, 101) indices = np.argsort(np.abs(I - X), kind='stable') for idx in indices: if I[idx] not in p: print(I[idx]) break
import numpy as np X, N = list(map(int, input().split())) try: p = np.array(list(map(int, input().split()))) except EOFError: print(X) exit() I = np.arange(0, 102) indices = np.argsort(np.abs(I - X), kind='stable') for idx in indices: if I[idx] not in p: print(I[idx]) break
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change" ]
358,123
358,124
u315133903
python
p02641
a = list(map(int,input().split())) x = a[0] if a[1] == 0 : print(x) else : b = list(map(int,input().split())) retu = [] for i in range(1,101) : retu.append(i) for i in b : if i in retu : retu.remove(i) k = 1000 ans = 0 for i in retu : y = abs(i - x) ...
a = list(map(int,input().split())) x = a[0] if a[1] == 0 : print(x) else : b = list(map(int,input().split())) retu = [] for i in range(0,102) : retu.append(i) for i in b : if i in retu : retu.remove(i) k = 1000 ans = 0 for i in retu : y = abs(i - x) ...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change", "control_flow.loop.range.bounds.upper.change" ]
358,187
358,188
u127025777
python
p02641
a = list(map(int,input().split())) x = a[0] if a[1] == 0 : print(x) else : b = list(map(int,input().split())) retu = [] for i in range(1,101) : retu.append(i) for i in b : if i in retu : retu.remove(i) k = 1000 ans = i for i in retu : y = abs(i - x) ...
a = list(map(int,input().split())) x = a[0] if a[1] == 0 : print(x) else : b = list(map(int,input().split())) retu = [] for i in range(0,102) : retu.append(i) for i in b : if i in retu : retu.remove(i) k = 1000 ans = 0 for i in retu : y = abs(i - x) ...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change", "control_flow.loop.range.bounds.upper.change", "assignment.value.change", "identifier.replace.remove", "literal.replace.add" ]
358,189
358,188
u127025777
python
p02641
x, n = map(int, input().split()) if n > 0: P = list(map(int, input().split())) else: P = [] ans, dist = 0, 1000 for i in range(101): if i not in P: if abs(i - x) < dist: dist = abs(i - x) ans = i print(ans)
x, n = map(int, input().split()) if n > 0: P = list(map(int, input().split())) else: P = [] ans, dist = 0, 1000 for i in range(-200, 200): if i not in P: if abs(i - x) < dist: dist = abs(i - x) ans = i print(ans)
[ "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "call.arguments.add" ]
358,200
358,201
u731322489
python
p02641
X,N=map(int,input().split()) if(N==0): print(X) exit() P= list(map(int,input().split())) c=-100 ans=100 for i in range(200): a=0 for i in range(200): if (abs(X-c)>=abs(X-c-a)): if not (c+a in P): if (abs(X-ans) >=abs(X-c-a)): ans=c+a a+=1 c+=1 if ...
X,N=map(int,input().split()) if(N==0): print(X) exit() P= list(map(int,input().split())) c=-100 ans=100000 for i in range(200): a=0 for i in range(200): if (abs(X-c)>=abs(X-c-a)): if not (c+a in P): if (abs(X-ans) >=abs(X-c-a)): ans=c+a a+=1 c+=1 ...
[ "literal.number.integer.change", "assignment.value.change" ]
358,224
358,225
u345132740
python
p02641
X,N=map(int,input().split()) if(N==0): print(X) exit() P= list(map(int,input().split())) c=0 ans=100 for i in range(100): a=0 for i in range(100): if (abs(X-c)>=abs(X-c-a)): if not (c+a in P): if (abs(X-ans) >=abs(X-c-a)): ans=c+a a+=1 c+=1 if (an...
X,N=map(int,input().split()) if(N==0): print(X) exit() P= list(map(int,input().split())) c=-100 ans=100000 for i in range(200): a=0 for i in range(200): if (abs(X-c)>=abs(X-c-a)): if not (c+a in P): if (abs(X-ans) >=abs(X-c-a)): ans=c+a a+=1 c+=1 ...
[ "assignment.value.change", "expression.operation.unary.add", "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,226
358,225
u345132740
python
p02641
def main(): X, N = map(int, input().split()) if N == 0: print(X) return p = tuple(map(int, input().split())) if X not in p: print(X) not_p = list(set([i for i in range(max(p)+2)]) - set(p)) not_p_X = [abs(X - i) for i in not_p] print(not_p[not_p_X.index(min(not_p_X))]) main()
def main(): X, N = map(int, input().split()) if N == 0: print(X) return p = tuple(map(int, input().split())) if X not in p: print(X) return not_p = list(set([i for i in range(max(p)+2)]) - set(p)) not_p_X = [abs(X - i) for i in not_p] print(not_p[not_p_X.index(min(not_p_X))]) mai...
[ "control_flow.return.add" ]
358,252
358,253
u012820749
python
p02641
def main(): X, N = map(int, input().split()) if N == 0: print(X) return p = tuple(map(int, input().split())) if X not in p: print(X) not_p = list(set([i for i in range(max(p)+2)]) - set(p)) not_p_X = [abs(i - X) for i in not_p] print(not_p[not_p_X.index(min(not_p_X))]) main()
def main(): X, N = map(int, input().split()) if N == 0: print(X) return p = tuple(map(int, input().split())) if X not in p: print(X) return not_p = list(set([i for i in range(max(p)+2)]) - set(p)) not_p_X = [abs(X - i) for i in not_p] print(not_p[not_p_X.index(min(not_p_X))]) mai...
[ "control_flow.return.add", "expression.operation.binary.remove" ]
358,254
358,253
u012820749
python
p02641
from sys import stdin X,N=[int(x) for x in stdin.readline().rstrip().split()] P=[int(x) for x in stdin.readline().rstrip().split()] l=[i for i in range(-100,101) if i not in P] abslist = list(map(lambda a:abs(a-X),l)) print(l[abslist.index(min(abslist))])
from sys import stdin X,N=[int(x) for x in stdin.readline().rstrip().split()] P=[int(x) for x in stdin.readline().rstrip().split()] l=[i for i in range(-1,102) if i not in P] abslist = list(map(lambda a:abs(a-X),l)) print(l[abslist.index(min(abslist))])
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,286
358,287
u809918012
python
p02641
import math from sys import stdin X,N=[int(x) for x in stdin.readline().rstrip().split()] P=[int(x) for x in stdin.readline().rstrip().split()] l=[i for i in range(-1,101) if i not in P] abslist = list(map(lambda a:abs(a-X),l)) print(l[abslist.index(min(abslist))])
from sys import stdin X,N=[int(x) for x in stdin.readline().rstrip().split()] P=[int(x) for x in stdin.readline().rstrip().split()] l=[i for i in range(-1,102) if i not in P] abslist = list(map(lambda a:abs(a-X),l)) print(l[abslist.index(min(abslist))])
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,288
358,287
u809918012
python
p02641
x,n=map(int,input().split()) if n==0: print(x) quit() lst=list(map(int,input().split())) a=list(range(-100,101)) for i in lst: if i in a: a.remove(i) if len(a)==0: print(x) quit() b=[] for j in a: b.append(abs(j-x)) print(a[b.index(min(b))])
x,n=map(int,input().split()) if n==0: print(x) quit() lst=list(map(int,input().split())) a=list(range(-1,102)) for i in lst: if i in a: a.remove(i) if len(a)==0: print(x) quit() b=[] for j in a: b.append(abs(j-x)) print(a[b.index(min(b))])
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,339
358,340
u245299791
python
p02641
x,n=map(int,input().split()) if n==0: print(x) quit() lst=list(map(int,input().split())) a=list(range(101)) for i in lst: if i in a: a.remove(i) if len(a)==0: print(x) quit() b=[] for j in a: b.append(abs(j-x)) print(a[b.index(min(b))])
x,n=map(int,input().split()) if n==0: print(x) quit() lst=list(map(int,input().split())) a=list(range(-1,102)) for i in lst: if i in a: a.remove(i) if len(a)==0: print(x) quit() b=[] for j in a: b.append(abs(j-x)) print(a[b.index(min(b))])
[ "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "call.arguments.add" ]
358,341
358,340
u245299791
python
p02641
# -*- coding: utf-8 -*- num, i = map(int, input().split()) if(i != 0): s = set(map(int, input().split())) else: s = set() m = set(range(101)) o = list(m-s) o2 = list(map(lambda x: abs(x - num), o)) print(o2.index(min(o2)))
# -*- coding: utf-8 -*- num, i = map(int, input().split()) if(i != 0): s = set(map(int, input().split())) else: s = set() m = set(range(102)) o = list(m-s) o2 = list(map(lambda x: abs(x - num), o)) print(o[o2.index(min(o2))])
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,348
358,349
u981938462
python
p02641
# -*- coding: utf-8 -*- num, i = map(int, input().split()) if(i != 0): s = set(map(int, input().split())) else: s = set() m = set(range(101)) o = list(m-s) o2 = list(map(lambda x: abs(x - num), o)) print(o[o2.index(min(o2))])
# -*- coding: utf-8 -*- num, i = map(int, input().split()) if(i != 0): s = set(map(int, input().split())) else: s = set() m = set(range(102)) o = list(m-s) o2 = list(map(lambda x: abs(x - num), o)) print(o[o2.index(min(o2))])
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,350
358,349
u981938462
python
p02641
x,n = map(int, input().split()) if n == 0: print(x) exit() p = list(map(int,input().split())) allList=[] for i in range(-201,301): allList.append(i) diff = set(allList) ^ set(p) diff = list(diff) diff.append(x) diff = sorted(diff) # print(diff) ind = diff.index(x) # print(ind) # if x == 100: ...
x,n = map(int, input().split()) if n == 0: print(x) exit() p = list(map(int,input().split())) allList=[] for i in range(-201,301): allList.append(i) diff = set(allList) ^ set(p) diff = list(diff) diff.append(x) diff = sorted(diff) # print(diff) ind = diff.index(x) # print(ind) # if x == 100: ...
[ "call.add" ]
358,392
358,393
u888881904
python
p02641
a = input().split() if a[1] == "0": print(a[0]) else: number_list = input().split() n = 1 number = int(a[0]) while True: num = number + n num2 = number - n if str(num) not in number_list or str(num2) not in number_list: if str(num) not in number_list and str(num2) not in number_list: ...
a = input().split() if a[1] == "0": print(a[0]) else: number_list = input().split() n = 0 number = int(a[0]) while True: num = number + n num2 = number - n if str(num) not in number_list or str(num2) not in number_list: if str(num) not in number_list and str(num2) not in number_list: ...
[ "literal.number.integer.change", "assignment.value.change" ]
358,416
358,417
u546236742
python
p02641
a = input().split() if a[1] == "0": print(a[0]) else: number_list = input().split() n = 1 number = int(a[0]) while True: num = number + n num2 = number - n if str(num) not in number_list or str(num2) not in number_list: if str(num) not in number_list and str(num2) not in number_list: ...
a = input().split() if a[1] == "0": print(a[0]) else: number_list = input().split() n = 0 number = int(a[0]) while True: num = number + n num2 = number - n if str(num) not in number_list or str(num2) not in number_list: if str(num) not in number_list and str(num2) not in number_list: ...
[ "literal.number.integer.change", "assignment.value.change", "control_flow.break.add" ]
358,418
358,417
u546236742
python
p02641
num = list(map(int,input().split())) if num[1] ==0: print(num[0]) else: num_list = list(map(int,input().split())) flg = True ans = num[0] distance = 1 while flg: ch_1 = ans-distance ch_2 = ans+distance if ch_1 not in num_list: print(ch_1) flg = False elif ch_2 not in num_list: ...
num = list(map(int,input().split())) if num[1] ==0: print(num[0]) else: num_list = list(map(int,input().split())) flg = True ans = num[0] distance = 0 while flg: ch_1 = ans-distance ch_2 = ans+distance if ch_1 not in num_list: print(ch_1) flg = False elif ch_2 not in num_list:...
[ "literal.number.integer.change", "assignment.value.change" ]
358,421
358,422
u552510302
python
p02641
X,N = map(int,input().split()) if N > 0: A = list(map(int,input().split())) d = {} for i in range(101): d[i] = 0 for a in A: d[a] = 1 for i in range(0,100): x = X - i y = X + i if d[x] == 0: print(x) quit() if d[y] == 0: ...
X,N = map(int,input().split()) if N > 0: A = list(map(int,input().split())) d = {} for i in range(102): d[i] = 0 for a in A: d[a] = 1 for i in range(0,100): x = X - i y = X + i if d[x] == 0: print(x) quit() if d[y] == 0: ...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,437
358,438
u221272125
python
p02641
import math X, N = map(int,input().split()) d = int(999) d1 = int() ans = int(999) if 0 < N: P = list(map(int,input().split())) for i in range(1,200): if P.count(i) == 0: d1 = abs(X-i) if d1 < d and 0 <= d1: d = d1 ans = i print(ans) else: ...
import math X, N = map(int,input().split()) d = int(999) d1 = int() ans = int(999) if 0 < N: P = list(map(int,input().split())) for i in range(999): if P.count(i) == 0: d1 = abs(X-i) if d1 < d and 0 <= d1: d = d1 ans = i print(ans) else: p...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change" ]
358,442
358,443
u096294926
python
p02641
import math X, N = map(int,input().split()) d = int(999) d1 = int() ans = int(999) if 0 < N: P = list(map(int,input().split())) for i in range(1,100): if P.count(i) == 0: d1 = abs(X-i) if d1 < d and 0 <= d1: d = d1 ans = i print(ans) else: ...
import math X, N = map(int,input().split()) d = int(999) d1 = int() ans = int(999) if 0 < N: P = list(map(int,input().split())) for i in range(999): if P.count(i) == 0: d1 = abs(X-i) if d1 < d and 0 <= d1: d = d1 ans = i print(ans) else: p...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change" ]
358,444
358,443
u096294926
python
p02641
import math X, N = map(int,input().split()) d = int(999) d1 = int() ans = int(999) if 0 < N: P = list(map(int,input().split())) for i in range(1,max(P)): if P.count(i) == 0: d1 = abs(X-i) if d1 < d and 0 <= d1: d = d1 ans = i print(ans) else: ...
import math X, N = map(int,input().split()) d = int(999) d1 = int() ans = int(999) if 0 < N: P = list(map(int,input().split())) for i in range(999): if P.count(i) == 0: d1 = abs(X-i) if d1 < d and 0 <= d1: d = d1 ans = i print(ans) else: p...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change" ]
358,445
358,443
u096294926
python
p02641
x, n = map(int, input().split()) if n == 0: print(x) exit() else: ps = list(map(int, input().split())) counters = [0 for _ in range(len(ps))] counters[0] = 1 for i,p in enumerate(ps): distance = abs(x - p) if distance < len(ps): counters[distance] += 1 print(counters) for i,counter in enumerate(counters...
x, n = map(int, input().split()) if n == 0: print(x) exit() else: ps = list(map(int, input().split())) counters = [0 for _ in range(len(ps)+1)] counters[0] = 1 for i,p in enumerate(ps): distance = abs(x - p) if distance < len(ps): counters[distance] += 1 for i,counter in enumerate(counters): if counte...
[ "call.remove" ]
358,498
358,497
u556326496
python
p02641
def resolve(): X, N = [int(i) for i in input().split()] if N == 0: print(X) return p_list = [int(i) for i in input().split()] min_len_with_X = 200 min_len_i = 0 for i in range(101): if i in p_list: continue if abs(i - X) < min_len_with_X: m...
def resolve(): X, N = [int(i) for i in input().split()] if N == 0: print(X) return p_list = [int(i) for i in input().split()] min_len_with_X = 200 min_len_i = 0 for i in range(102): if i in p_list: continue if abs(i - X) < min_len_with_X: m...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,499
358,500
u716117006
python
p02641
def resolve(): X, N = [int(i) for i in input().split()] if N == 0: print(X) return p_list = [int(i) for i in input().split()] min_len_with_X = 100 min_len_i = 0 for i in range(101): if i in p_list: continue if abs(i - X) < min_len_with_X: m...
def resolve(): X, N = [int(i) for i in input().split()] if N == 0: print(X) return p_list = [int(i) for i in input().split()] min_len_with_X = 200 min_len_i = 0 for i in range(102): if i in p_list: continue if abs(i - X) < min_len_with_X: m...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,501
358,500
u716117006
python
p02641
def resolve(): X, N = [int(i) for i in input().split()] if N == 0: print(X) return p_list = [int(i) for i in input().split()] min_len_with_X = 100 min_len_i = 0 for i in range(1, 101): if i in p_list: continue if abs(i - X) < min_len_with_X: ...
def resolve(): X, N = [int(i) for i in input().split()] if N == 0: print(X) return p_list = [int(i) for i in input().split()] min_len_with_X = 200 min_len_i = 0 for i in range(102): if i in p_list: continue if abs(i - X) < min_len_with_X: m...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change" ]
358,502
358,500
u716117006
python
p02641
import math input_a= input().split(" ") X=int(input_a[0]) N=int(input_a[1]) dis=X+3 if N!=0: array= input().split(" ") else: array=[0,0] num=X num2=-100 for i in range(N+1): if str(num) not in array: dis=abs(X-num) num2=X-dis num1=num if str(num2) not in array: numa=min([num,num2]) e...
import math input_a= input().split(" ") X=int(input_a[0]) N=int(input_a[1]) dis=X+3 dis2=100 if N!=0: array= input().split(" ") else: array=[0,0] num=X num2=-100 for i in range(N+1): if str(num) not in array: dis=abs(X-num) num2=X-dis num1=num if str(num2) not in array: numa=min([num,num...
[ "assignment.add" ]
358,503
358,504
u551906883
python
p02641
x, n = map(int, input().split()) lst = [] x1 = x x2 = x def minus(num): return int(num) - 1 def plus(num): return int(num) + 1 if n != 0: lst = list(map(int, input().split())) for j in range(5): count = 0 for i in lst: if x1 == i: x1 = minus(x1) ...
x, n = map(int, input().split()) lst = [] x1 = x x2 = x def minus(num): return int(num) - 1 def plus(num): return int(num) + 1 if n != 0: lst = list(map(int, input().split())) for j in range(n): count = 0 for i in lst: if x1 == i: x1 = minus(x1) ...
[ "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "control_flow.branch.if.condition.change" ]
358,511
358,512
u321415743
python
p02641
x, n = map(int, input().split()) not_p = [] if n != 0: p = list(map(int, input().split())) not_p = [i for i in range(201) if i not in p] else: not_p = [i for i in range(201)] print(not_p) mn = 101 ans = 100 for i in not_p: d = abs(x - i) if mn > d: mn = d ans = i print(ans)
x, n = map(int, input().split()) not_p = [] if n != 0: p = list(map(int, input().split())) not_p = [i for i in range(201) if i not in p] else: not_p = [i for i in range(201)] mn = 101 ans = 100 for i in not_p: d = abs(x - i) if mn > d: mn = d ans = i print(ans)
[ "call.remove" ]
358,513
358,514
u699089116
python
p02641
x, n = map(int, input().split()) not_p = [] if n != 0: p = list(map(int, input().split())) not_p = [i for i in range(101) if i not in p] else: not_p = [i for i in range(101)] mn = 101 ans = 100 for i in not_p: d = abs(x - i) if mn > d: mn = d ans = i print(ans)
x, n = map(int, input().split()) not_p = [] if n != 0: p = list(map(int, input().split())) not_p = [i for i in range(201) if i not in p] else: not_p = [i for i in range(201)] mn = 101 ans = 100 for i in not_p: d = abs(x - i) if mn > d: mn = d ans = i print(ans)
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,515
358,514
u699089116
python
p02641
x,n=list(map(int,input().split(' '))) if n == 0: print (x) else: p=list(map(int,input().split(' '))) chk_x = False pmax = 0 pmin = 101 for pr in p: if pmax < pr: pmax = pr if pmin > pr: pmin = pr if pr == x: chk_x = True all_i = ...
x,n=list(map(int,input().split(' '))) if n == 0: print (x) else: p=list(map(int,input().split(' '))) chk_x = False pmax = 0 pmin = 101 for pr in p: if pmax < pr: pmax = pr if pmin > pr: pmin = pr if pr == x: chk_x = True all_i = ...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,526
358,525
u167943640
python
p02641
x, n = [int(s) for s in input().split(" ")] if n == 0: print(x) else: plist = [int(s) for s in input().split(" ")] dlist = {} for p in plist: d = abs(p - x) if d in dlist or d == 0: dlist[d] = (True, None) else: dlist[d] = (False, p - x) sorted_d = sorted(dlist.items(), key=lambda x:...
x, n = [int(s) for s in input().split(" ")] if n == 0: print(x) else: plist = [int(s) for s in input().split(" ")] dlist = {} for p in plist: d = abs(p - x) if d in dlist or d == 0: dlist[d] = (True, None) else: dlist[d] = (False, p - x) sorted_d = sorted(dlist.items(), key=lambda x:...
[ "control_flow.loop.for.condition.change" ]
358,546
358,547
u018776180
python
p02641
x, n = map(int, input().split()) if n != 0: p = list(map(int, input().split())) q = [] for i in range(101): if i in p: q.append(150) else: q.append(abs(i-x)) list_indexMin = [i for i, v in enumerate(q) if v == min(q)] print(min(list_indexMin)) else: print(x)
x, n = map(int, input().split()) if n != 0: p = list(map(int, input().split())) q = [] for i in range(102): if i in p: q.append(150) else: q.append(abs(i-x)) list_indexMin = [i for i, v in enumerate(q) if v == min(q)] print(min(list_indexMin)) else: print(x)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,589
358,590
u130659137
python
p02641
x, n = map(int, input().split()) if n != 0: p = list(map(int, input().split())) q = [] for i in range(101): if i in p: q.append(150) else: q.append(abs(i-x)) list_indexMin = [i for i, v in enumerate(q) if v == min(q)] print(q) print(min(list_indexMin)) else: print(x)
x, n = map(int, input().split()) if n != 0: p = list(map(int, input().split())) q = [] for i in range(102): if i in p: q.append(150) else: q.append(abs(i-x)) list_indexMin = [i for i, v in enumerate(q) if v == min(q)] print(min(list_indexMin)) else: print(x)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "call.remove" ]
358,591
358,590
u130659137
python
p02641
x, n = map(int, input().split()) if n != 0: p = list(map(int, input().split())) q = [] for i in range(101): if i in p: q.append(101) else: q.append(abs(i-x)) list_indexMin = [i for i, v in enumerate(q) if v == min(q)] print(min(list_indexMin)) else: print(x)
x, n = map(int, input().split()) if n != 0: p = list(map(int, input().split())) q = [] for i in range(102): if i in p: q.append(150) else: q.append(abs(i-x)) list_indexMin = [i for i, v in enumerate(q) if v == min(q)] print(min(list_indexMin)) else: print(x)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,592
358,590
u130659137
python
p02641
import sys def main(): X, N = list(map(int, input().split())); ans = X; min_value = 101 if N == 0: print(ans) else: p = list(map(int, input().split())) a = [i for i in range(0, 101)] for v in p: a[v] = -1 for i in range(0, 101): if a[i] != -1: d = abs(X - a[i]) ...
def main(): X, N = list(map(int, input().split())) ans = X; min_value = 202 if N == 0: print(ans) else: p = list(map(int, input().split())) a = [i for i in range(0, 202)] for v in p: a[v] = -1 for i in range(0, 202): if a[i] != -1: d = abs(X - a[i]) if(min_...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,613
358,614
u393486651
python
p02641
import sys def main(): X, N = list(map(int, input().split())); ans = X; min_value = 101 if N == 0: print(ans) else: p = list(map(int, input().split())) a = [i for i in range(0, 101)] for v in p: a[v] = -1 for i in range(0, 101): if a[i] != -1: d = abs(X - a[i]) ...
def main(): X, N = list(map(int, input().split())) ans = X; min_value = 202 if N == 0: print(ans) else: p = list(map(int, input().split())) a = [i for i in range(0, 202)] for v in p: a[v] = -1 for i in range(0, 202): if a[i] != -1: d = abs(X - a[i]) if(min_...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,615
358,614
u393486651
python
p02641
from sys import stdin X,N = map(int,input().split()) p = list(map(int,stdin.readline().split())) def solve(): i = 1 if N == 0: print(X) return if not X in p: print(X) return while i < 10: if not X-i in p: print(X-i) return if not ...
from sys import stdin X,N = map(int,input().split()) p = list(map(int,stdin.readline().split())) def solve(): i = 1 if N == 0: print(X) return if not X in p: print(X) return while True: if not X-i in p: print(X-i) return if not X+...
[ "control_flow.loop.condition.change" ]
358,616
358,617
u499998503
python
p02641
x, n = map(int, input().split()) if n == 0: print(x) exit() p = list(map(int, input().split())) unique = set(range(-100, 101)) - set(p) ans = {} ans2 = [] for i in unique: calc = abs(x-i) if calc in ans.keys(): ans[calc] = min(ans[calc], i) else: ans[calc] = i ans2.append(calc) print(ans[min(ans2)])
x, n = map(int, input().split()) if n == 0: print(x) exit() p = list(map(int, input().split())) unique = set(range(0, 102)) - set(p) ans = {} ans2 = [] for i in unique: calc = abs(x-i) if calc in ans.keys(): ans[calc] = min(ans[calc], i) else: ans[calc] = i ans2.append(calc) print(ans[min(ans2)])
[ "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.range.bounds.upper.change", "expression.operation.unary.remove", "literal.number.integer.change" ]
358,625
358,626
u035445296
python
p02641
x,n = map(int,input().split()) if n == 0: print(x) else: li = list(map(int,input().split())) for i in range(1, 101): up = x + i down = x - i if down not in li: print(down) break elif up not in li: print(up) break
x,n = map(int,input().split()) if n == 0: print(x) else: li = list(map(int,input().split())) for i in range(0, 101): up = x + i down = x - i if down not in li: print(down) break elif up not in li: print(up) break
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change" ]
358,646
358,647
u158126367
python
p02641
import numpy as np a = list(map(int,input().split())) x = a[0] n = a[1] if (n == 0): print(x) else: d = list(map(int,input().split())) min_int = d[np.argmin(d)] max_int = d[np.argmax(d)] if (x < min_int or max_int < x): print(x) else: p = [] for var in range(min_int,max...
import numpy as np a = list(map(int,input().split())) x = a[0] n = a[1] if (n == 0): print(x) else: d = list(map(int,input().split())) min_int = d[np.argmin(d)] max_int = d[np.argmax(d)] if (x < min_int or max_int < x): print(x) else: p = [] for var in range(min_int - 1...
[ "control_flow.loop.range.bounds.lower.change", "expression.operation.binary.add", "control_flow.loop.range.bounds.upper.change" ]
358,706
358,707
u055981695
python
p02641
F = input().split() X = int(F[0]) N = int(F[1]) k = 0 L = -1 if N == 0: q = [N] else: p = list(map(int, input().split())) p.sort() q = list(set(p)) while k == 0: L += 1 deka = X+L tibi = X-L for i in range(len(q)): if q[i] == deka: deka = 0 if q[i] == tibi: tibi = 0 if deka != 0 or tibi != 0: ...
F = input().split() X = int(F[0]) N = int(F[1]) k = 0 L = -1 if N == 0: q = [N] else: p = list(map(int, input().split())) p.sort() q = list(set(p)) while k == 0: L += 1 deka = X+L tibi = X-L for i in range(len(q)): if q[i] == deka: deka = 999 if q[i] == tibi: tibi = 999 if deka != 999 or tibi !=...
[ "literal.number.integer.change", "assignment.value.change", "control_flow.branch.if.condition.change" ]
358,721
358,722
u374372942
python
p02641
X,N=map(int,input().split()) if N==0: print(X) exit() p=list(map(int,input().split())) if X not in p: print(X) exit() tmp=101 for i in range(101): if i not in p: if tmp>abs(X-i): ans=i tmp=abs(X-i) print(ans)
X,N=map(int,input().split()) if N==0: print(X) exit() p=list(map(int,input().split())) if X not in p: print(X) exit() tmp=101 for i in range(200): if i not in p: if tmp>abs(X-i): ans=i tmp=abs(X-i) print(ans)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,725
358,726
u640603056
python
p02641
X,N=map(int,input().split()) if N==0: print(X) exit() p=list(map(int,input().split())) if X not in p: print(X) exit() tmp=101 for i in range(-100,101): if i in p: continue if tmp>abs(X-i): ans=i tmp=abs(X-i) print(ans)
X,N=map(int,input().split()) if N==0: print(X) exit() p=list(map(int,input().split())) if X not in p: print(X) exit() tmp=101 for i in range(200): if i not in p: if tmp>abs(X-i): ans=i tmp=abs(X-i) print(ans)
[ "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "control_flow.branch.if.condition.change" ]
358,727
358,726
u640603056
python
p02641
X,N=map(int,input().split()) if N==0: print(X) exit() p=list(map(int,input().split())) if X not in p: print(X) exit() tmp=100000 for i in range(101): if i in p: continue if tmp>abs(X-i): ans=i tmp=abs(X-i) print(ans)
X,N=map(int,input().split()) if N==0: print(X) exit() p=list(map(int,input().split())) if X not in p: print(X) exit() tmp=101 for i in range(200): if i not in p: if tmp>abs(X-i): ans=i tmp=abs(X-i) print(ans)
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "control_flow.branch.if.condition.change" ]
358,728
358,726
u640603056
python
p02641
def main(): x,n=map(int,input().split()) p=[] try: p=list(map(int,input().split())) except: print(str(x)) return p=set(p) ans=0 ansc=x for i in range(1,101): if not(i in p): a=min(abs(x-i),ansc) if(a!=ansc): ans=i ansc=a print(ans) main()
def main(): x,n=map(int,input().split()) p=[] try: p=list(map(int,input().split())) except: print(str(x)) return p=set(p) ans=0 ansc=x for i in range(1,102): if not(i in p): a=min(abs(x-i),ansc) if(a!=ansc): ans=i ansc=a print(ans) main()
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,733
358,734
u388084260
python
p02641
# -*- coding: utf-8 -*- X, N= map(int, input().split()) if N == 0: print(X) else: p = input().split() i = 1 while True: if (str(X-i) in p) == False: print(X-i) break elif (str(X+i) in p) == False: print(X+i) break else: i += 1
# -*- coding: utf-8 -*- X, N= map(int, input().split()) if N == 0: print(X) else: p = input().split() i = 0 while True: if (str(X-i) in p) == False: print(X-i) break elif (str(X+i) in p) == False: print(X+i) break else: i += 1
[ "literal.number.integer.change", "assignment.value.change" ]
358,745
358,746
u416318434
python
p02641
x,n=map(int,input().split()) import sys if n>=1: p=list(map(int,input().split())) else: print(x) sys.exit() s=[] d={} l={} for i in range(-101,101): if i not in p: s.append(i) for k in s: d[k]=abs(x-k) l=[m[0] for m in d.items() if m[1]==min(d.values())] print(min(l))
x,n=map(int,input().split()) import sys if n>=1: p=list(map(int,input().split())) else: print(x) sys.exit() s=[] d={} l={} for i in range(-105,200): if i not in p: s.append(i) for k in s: d[k]=abs(x-k) l=[m[0] for m in d.items() if m[1]==min(d.values())] print(min(l))
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,767
358,768
u816171517
python
p02641
x,n=map(int,input().split()) import sys if n>=1: p=list(map(int,input().split())) else: print(x) sys.exit() s=[] d={} l={} for i in range(101): if i not in p: s.append(i) for k in s: d[k]=abs(x-k) l=[m[0] for m in d.items() if m[1]==min(d.values())] print(min(l))
x,n=map(int,input().split()) import sys if n>=1: p=list(map(int,input().split())) else: print(x) sys.exit() s=[] d={} l={} for i in range(-105,200): if i not in p: s.append(i) for k in s: d[k]=abs(x-k) l=[m[0] for m in d.items() if m[1]==min(d.values())] print(min(l))
[ "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "call.arguments.add" ]
358,769
358,768
u816171517
python
p02641
X,N=map(int, input().split()) ans=0 flag=0 if N!=0: P=sorted(list(map(int, input().split()))) pabs=[] for p in P: pabs.append(abs(X-p)) pabs.sort() if 0 in pabs: for i in range(1,max(pabs)+1): if i in pabs: if pabs.count(i)==1: if X-i not in P: ans=X-i flag=1 break el...
X,N=map(int, input().split()) ans=0 flag=0 if N!=0: P=sorted(list(map(int, input().split()))) pabs=[] for p in P: pabs.append(abs(X-p)) pabs.sort() if 0 in pabs: for i in range(1,max(pabs)+1): if i in pabs: if pabs.count(i)==1: if X-i not in P: ans=X-i flag=1 break ...
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "expression.operation.binary.change" ]
358,773
358,774
u608178601
python
p02641
X, N = map(int, input().split(" ")) if N == 0: print(X) exit() else: p = list(map(int, input().split(" "))) c = 0 for i in range(100): if i+1 not in p: if abs(X-(i+1)) < abs(X-c): c = i+1 print(c)
X, N = map(int, input().split(" ")) if N == 0: print(X) exit() else: p = list(map(int, input().split(" "))) c = 0 for i in range(200): if i+1 not in p: if abs(X-(i+1)) < abs(X-c): c = i+1 else: print(c) exit()
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "call.add" ]
358,786
358,787
u403385724
python
p02641
XX, N = map(int, input().split(" ")) if N == 0: print(X) exit() else: p = list(map(int, input().split(" "))) c = -1 for i in range(100): if i+1 not in p: if abs(X-(i+1)) < abs(X-c): c = i+1 else: print(c) exit()
X, N = map(int, input().split(" ")) if N == 0: print(X) exit() else: p = list(map(int, input().split(" "))) c = 0 for i in range(200): if i+1 not in p: if abs(X-(i+1)) < abs(X-c): c = i+1 else: print(c) exit()
[ "assignment.variable.change", "identifier.change", "assignment.value.change", "expression.operation.unary.remove", "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,789
358,787
u403385724
python
p02641
XN = list(map(int, input().split())) if XN[1] == 0: print(XN[0]) else: p = list(map(int, input().split())) for d in range(XN[1] + 1): if not XN[0] - d in p: print(XN[0] - d) elif not XN[0] + d in p: print(XN[0] + d)
XN = list(map(int, input().split())) if XN[1] == 0: print(XN[0]) else: p = list(map(int, input().split())) for d in range(XN[1] + 1): if not XN[0] - d in p: print(XN[0] - d) break if not XN[0] + d in p: print(XN[0] + d) break
[ "control_flow.break.add" ]
358,843
358,844
u113569368
python
p02641
x, n = map(int, input().split()) if n != 0: n = list(map(int, input().split())) ans = [] for i in range(1, 101): if n.count(x + i) == 0: ans.append(x + i) if n.count(x - i) == 0: ans.append(x - i) if ans != []: break print(min(ans)) else: print(x)
x, n = map(int, input().split()) if n != 0: n = list(map(int, input().split())) ans = [] for i in range(101): if n.count(x + i) == 0: ans.append(x + i) if n.count(x - i) == 0: ans.append(x - i) if ans != []: break print(min(ans)) else: print(x)
[ "call.arguments.change" ]
358,849
358,850
u068142202
python
p02641
X, N = list(map(int, input().split())) if N == 0: print(X) else: p = list(map(int, input().split())) not_p = set(range(101)) - set(p) arg_min = 10000 value_min = 10000 for i in not_p: tmp = abs(X - i) if tmp < value_min or (tmp == value_min and i < arg_min): value_mi...
X, N = list(map(int, input().split())) if N == 0: print(X) else: p = list(map(int, input().split())) not_p = set(range(-100, 110)) - set(p) arg_min = 10000 value_min = 10000 for i in not_p: tmp = abs(X - i) if tmp < value_min or (tmp == value_min and i < arg_min): va...
[ "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.range.bounds.upper.change", "call.arguments.add" ]
358,901
358,902
u262525101
python
p02641
x, n = map(int,input().split()) if n != 0: p = list(map(int,input().split())) else: print(x) quit() p.sort() d = 10 ** 9 for i in range(-1000,1000): if d > abs(i-x) and i not in p: d = abs(i-x) ans = i print(i) print(ans)
x, n = map(int,input().split()) if n != 0: p = list(map(int,input().split())) else: print(x) quit() p.sort() d = 10 ** 9 for i in range(-1000,1000): if d > abs(i-x) and i not in p: d = abs(i-x) ans = i print(ans)
[ "call.remove" ]
358,920
358,921
u197968862
python
p02641
x, n = map(int,input().split()) if n != 0: p = list(map(int,input().split())) else: print(x) quit() p.sort() d = 10 ** 9 for i in range(-100,100): if d > abs(i-x) and i not in p: d = abs(i-x) ans = i print(ans)
x, n = map(int,input().split()) if n != 0: p = list(map(int,input().split())) else: print(x) quit() p.sort() d = 10 ** 9 for i in range(-1000,1000): if d > abs(i-x) and i not in p: d = abs(i-x) ans = i print(ans)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
358,922
358,921
u197968862
python
p02641
x_n = input() x_n_list = x_n.split() x = int(x_n_list[0]) n = int(x_n_list[1]) if n == 0: print(x) else: allp = input() p_list = allp.split() p_l = [int(n) for n in p_list] if x not in p_l: print(x) else: for i in range(len(p_l)): if x - i in p_l: print(x - i - 1) break e...
x_n = input() x_n_list = x_n.split() x = int(x_n_list[0]) n = int(x_n_list[1]) if n == 0: print(x) else: allp = input() p_list = allp.split() p_l = [int(n) for n in p_list] if x not in p_l: print(x) else: for i in range(len(p_l)): if x - i - 1 not in p_l: print(x - i - 1) break...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
358,927
358,928
u290983503
python
p02641
X, N = map(int, input().split()) if N!=0: p=list(map(int,input().split())) checkNum=[0 for j in range(101)] for i in range(len(p)): checkNum[p[i]]=1 i=0 while(X-i>=0 or X+i<=100): if X-i>=0: if checkNum[X-i]==0: print(X-i) break if ...
X, N = map(int, input().split()) if N!=0: p=list(map(int,input().split())) checkNum=[0 for j in range(102)] for i in range(len(p)): checkNum[p[i]]=1 i=0 while(X-i>=0 or X+i<=101): if X-i>=0: if checkNum[X-i]==0: print(X-i) break if ...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "control_flow.loop.condition.change", "control_flow.branch.if.condition.change" ]
358,972
358,973
u462976050
python
p02641
X, N = [int(i) for i in input().split()] if N == 0: # if False: print(X) else: Ps = set([int(i) for i in input().split()]) # 間違い。なぜ...??? if X not in Ps: print(X) # print(f'{X} {sorted(Ps)}') diff = 0 while True: a = X - diff if a not in Ps: print(a) ...
X, N = [int(i) for i in input().split()] if N == 0: print(X) else: Ps = set([int(i) for i in input().split()]) # 間違い。なぜ...??? if X not in Ps: print(X) exit(0) # print(f'{X} {sorted(Ps)}') diff = 0 while True: a = X - diff if a not in Ps: print(a)...
[ "call.add" ]
359,008
359,009
u003142309
python
p02641
X, N = map(int,input().split(' ')) if N == 0: print(X) exit() p = input().split(' ') p =[int(i) for i in p] if X not in p: print(X) exit() num_list = [int(i) for i in range(102)] [num_list.remove(p[i]) for i in range(N)] tmp = [0] * int(len(num_list)) for i in range(len(num_list)): tmp[i] = abs(...
X, N = map(int,input().split(' ')) if N == 0: print(X) exit() p = input().split(' ') p =[int(i) for i in p] if X not in p: print(X) exit() num_list = [int(i) for i in range(102)] [num_list.remove(p[i]) for i in range(N)] tmp = [0] * int(len(num_list)) for i in range(len(num_list)): tmp[i] = abs(...
[ "assignment.value.change", "call.arguments.change" ]
359,011
359,012
u033287260
python
p02641
x,n=map(int,input().split()) if n==0: print(x) else: a=list(map(int,input().split())) ans=-1 for i in range(1,101): if i not in a and abs(i-x)<abs(ans-x): ans=i print(ans)
x,n=map(int,input().split()) if n==0: print(x) else: a=list(map(int,input().split())) ans=-1 for i in range(0,102): if i not in a and abs(i-x)<abs(ans-x): ans=i print(ans)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change", "control_flow.loop.range.bounds.upper.change" ]
359,079
359,080
u623687794
python
p02641
x,n=map(int,input().split()) if n==0: print(x) else: a=list(map(int,input().split())) ans=-1 for i in range(0,101): if i not in a and abs(i-x)<abs(ans-x): ans=i print(ans)
x,n=map(int,input().split()) if n==0: print(x) else: a=list(map(int,input().split())) ans=-1 for i in range(0,102): if i not in a and abs(i-x)<abs(ans-x): ans=i print(ans)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
359,081
359,080
u623687794
python
p02641
def main(): import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) x, n = map(int, readline().split()) p = list(map(int, readline().split())) p.sort() check = float('inf') ans = 0 for...
def main(): import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) x, n = map(int, readline().split()) p = list(map(int, readline().split())) check = float('inf') ans = 0 for i in range(1...
[ "call.remove", "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
359,128
359,129
u691018832
python
p02641
x,n=map(int, input().split()) if n == 0: print(x) exit() p=list(map(int, input().split())) all=set(range(-100,101)) s_p=set(p) kouho=sorted(all-s_p) min_dis=100 for i in kouho: dis=abs(i-x) if min_dis > dis: min_i=i min_dis=dis print(min_i)
x,n=map(int, input().split()) if n == 0: print(x) exit() p=list(map(int, input().split())) all=set(range(-100,102)) s_p=set(p) kouho=sorted(all-s_p) min_dis=201 for i in kouho: dis=abs(i-x) if min_dis > dis: min_i=i min_dis=dis print(min_i)
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
359,180
359,181
u145145077
python
p02641
x,n=map(int,input().split()) if n==0: print(x) else: p=list(map(int,input().split())) num=[1]*102 count=1 for i in p: num[i]=0 if num[x]==1: print(x) while True: if x-count>-1: if num[x-count]==1: print(x-count) break ...
x,n=map(int,input().split()) if n==0: print(x) else: p=list(map(int,input().split())) num=[1]*102 count=1 for i in p: num[i]=0 if num[x]==1: print(x) else: while True: if x-count>-1: if num[x-count]==1: print(x-cou...
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
359,234
359,235
u040053163
python
p02641
x,n=map(int,input().split()) if n==0: print(x) else: p=list(map(int,input().split())) num=[1]*101 count=1 for i in p: num[i]=0 if num[x]==1: print(x) while True: if x-count>-1: if num[x-count]==1: print(x-count) break ...
x,n=map(int,input().split()) if n==0: print(x) else: p=list(map(int,input().split())) num=[1]*102 count=1 for i in p: num[i]=0 if num[x]==1: print(x) else: while True: if x-count>-1: if num[x-count]==1: print(x-cou...
[ "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change", "control_flow.branch.if.condition.change" ]
359,236
359,235
u040053163
python
p02641
x,n=map(int,input().split()) if n==0: print(x) else: p=list(map(int,input().split())) num=[1]*102 count=1 for i in p: num[i]=0 if num[x]==1: print(x) while True: if x-count>-1: if num[x-count]==1: print(x-count) break ...
x,n=map(int,input().split()) if n==0: print(x) else: p=list(map(int,input().split())) num=[1]*102 count=1 for i in p: num[i]=0 if num[x]==1: print(x) else: while True: if x-count>-1: if num[x-count]==1: print(x-cou...
[]
359,237
359,235
u040053163
python
p02641
x, n = map(int, input().split()) minn = 10000000 if n == 0: print(x) exit() p = list(map(int, input().split())) for i in range(101): if i not in p: tmp = abs(x-i) if minn > tmp: ans = i minn = tmp elif minn == tmp: ans = min(i, ans) print(ans)
x, n = map(int, input().split()) minn = 10000000 if n == 0: print(x) exit() p = list(map(int, input().split())) for i in range(1000): if i not in p: tmp = abs(x-i) if minn > tmp: ans = i minn = tmp elif minn == tmp: ans = min(i, ans) print(ans)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
359,376
359,375
u520843951
python
p02641
x, n = map(int, input().split()) minn = 10000000 if n == 0: print(x) exit() p = list(map(int, input().split())) for i in range(1, 101): if i not in p: tmp = abs(x-i) if minn > tmp: ans = i minn = tmp elif minn == tmp: ans = min(i, ans) print(ans)
x, n = map(int, input().split()) minn = 10000000 if n == 0: print(x) exit() p = list(map(int, input().split())) for i in range(1000): if i not in p: tmp = abs(x-i) if minn > tmp: ans = i minn = tmp elif minn == tmp: ans = min(i, ans) print(ans)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change" ]
359,377
359,375
u520843951
python
p02641
x, n = map(int, input().split()) minn = 10000000 if n == 0: print(x) exit() p = list(map(int, input().split())) for i in range(101): if not i in p: tmp = abs(x-i) if minn > tmp: ans = i minn = tmp elif minn == tmp: ans = min(i, ans) print(ans)
x, n = map(int, input().split()) minn = 10000000 if n == 0: print(x) exit() p = list(map(int, input().split())) for i in range(1000): if i not in p: tmp = abs(x-i) if minn > tmp: ans = i minn = tmp elif minn == tmp: ans = min(i, ans) print(ans)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "control_flow.branch.if.condition.change" ]
359,378
359,375
u520843951
python
p02641
x,n = map(int, input().split()) if n==0: print(x) else: p = list(map(int,input().split())) for i in range(1, 100): if x-i not in p: print(x-i) break elif x+i not in p: print(x+i) break
x,n = map(int, input().split()) if n==0: print(x) else: p = list(map(int,input().split())) for i in range(100): if x-i not in p: print(x-i) break elif x+i not in p: print(x+i) break
[ "call.arguments.change" ]
359,456
359,457
u531599639
python
p02641
# coding: utf-8 # Your code here! X, N = map(int, input().split()) if N==0: print(X) exit() P = map(int, input().split()) l = [0] * 100 for p in P: l[p-1] = 1 i = 1 while 1: if X-i-1 < 0: print(0) exit() elif l[X-i-1] == 0: print(X-i) exit() elif X+i-1 >= ...
# coding: utf-8 # Your code here! X, N = map(int, input().split()) if N==0: print(X) exit() P = map(int, input().split()) l = [0] * 100 for p in P: l[p-1] = 1 i = 0 while 1: if X-i-1 < 0: print(0) exit() elif l[X-i-1] == 0: print(X-i) exit() elif X+i-1 >= ...
[ "literal.number.integer.change", "assignment.value.change" ]
359,460
359,461
u707712609
python
p02641
import sys input = sys.stdin.readline def main(): x, n = map(int, input().rstrip().split()) if n == 0: print(x) sys.exit() else: p = list(map(int, input().rstrip().split())) if x > max(p): print(x) sys.exit() else: p_x = set(range...
import sys input = sys.stdin.readline def main(): x, n = map(int, input().rstrip().split()) if n == 0: print(x) sys.exit() else: p = list(map(int, input().rstrip().split())) if x > max(p): print(x) sys.exit() else: p_x = set(range...
[ "assignment.value.change", "identifier.replace.remove", "literal.replace.add", "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.remove" ]
359,469
359,470
u591182368
python
p02641
X, N = list(map(int,input().split())) if N !=0: P = list(map(int,input().split())) ab = 100 for i in range(-100,101): if i not in P: if abs(X-i)<ab: ab = abs(X-i) ans = i print(ans) else: print(X)
X, N = list(map(int,input().split())) if N !=0: P = list(map(int,input().split())) ab = 100 for i in range(-100,200): if i not in P: if abs(X-i)<ab: ab = abs(X-i) ans = i print(ans) else: print(X)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
359,473
359,474
u690442716
python
p02641
x,n=map(int,input().split()) if(n==0): print(x) else: l=list(map(int,input().split())) d=100 for i in range(101): if(i not in l and (abs(i-x)<d)): d=abs(x-i) m=i print(m)
x,n=map(int,input().split()) if(n==0): print(x) else: l=list(map(int,input().split())) d=100 for i in range(102): if(i not in l and (abs(i-x)<d)): d=abs(x-i) m=i print(m)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
359,493
359,494
u235499392
python
p02641
x,n=map(int,input().split()) if(n==0): print(x) else: l=list(map(int,input().split())) d=100 m=x for i in range(1,101): if(i not in l and (abs(i-x)<d)): d=abs(x-i) m=i print(m)
x,n=map(int,input().split()) if(n==0): print(x) else: l=list(map(int,input().split())) d=100 for i in range(102): if(i not in l and (abs(i-x)<d)): d=abs(x-i) m=i print(m)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change" ]
359,495
359,494
u235499392
python
p02641
X, N = list(map(int, input().split())) if(N == 0): print(X) exit() p = list(map(int, input().split())) a = [num for num in range(1, 101)] diff = list(set(a) - set(p)) diff.sort(reverse=True) ans = 10**10 for i in diff: if(abs(ans - X) >= abs(i - X)): ans = i print(ans)
X, N = list(map(int, input().split())) if(N == 0): print(X) exit() p = list(map(int, input().split())) a = [num for num in range(-1001, 1001)] diff = list(set(a) - set(p)) diff.sort(reverse=True) ans = 10**10 for i in diff: if(abs(ans - X) >= abs(i - X)): ans = i print(ans)
[ "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change", "expression.operation.unary.add", "control_flow.loop.range.bounds.upper.change", "literal.number.integer.change" ]
359,500
359,501
u450904670
python
p02641
import sys x,n = map(int,input().split()) if n==0: print(x) sys.exit() p = list(map(int,input().split())) for i in range(1,150): if x-i not in p: print(x-i) break if x+i not in p: print(x+i) break
import sys x,n = map(int,input().split()) if n==0: print(x) sys.exit() p = list(map(int,input().split())) for i in range(150): if x-i not in p: print(x-i) break if x+i not in p: print(x+i) break
[ "call.arguments.change" ]
359,508
359,509
u667694979
python
p02641
x, n = map(int, input().split()) if n != 0: p = list(map(int, input().split())) if x in p: for i in range(-1000, 1001): print(i) if i == -1000: mini = i if i in p: pass else: if abs(x - mini) > abs(x - i): ...
x, n = map(int, input().split()) if n != 0: p = list(map(int, input().split())) if x in p: for i in range(-1000, 1001): if i == -1000: mini = i if i in p: pass else: if abs(x - mini) > abs(x - i): min...
[ "call.remove" ]
359,512
359,513
u038620042
python
p02641
import math x,n=map(int,input().split()) if n==0: p=[] else: p=list(map(int,input().split())) p_sort=sorted(p) result={} for i in range(100+1): if not i in p_sort: result[i]=abs(x-i) print(min(result, key=result.get))
import math x,n=map(int,input().split()) if n==0: p=[] else: p=list(map(int,input().split())) p_sort=sorted(p) result={} for i in range(100+2): if not i in p_sort: result[i]=abs(x-i) print(min(result, key=result.get))
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.range.bounds.upper.change" ]
359,516
359,517
u944325914
python