ZhenlongDai/ACPR huggingface dataset:
Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x = map(int,input().split())
y = list(map(int,input().split()))
a = [x-y[i] for i in range(n)]
def gcd(a,b):
    return gcd(b,a%b) if b else abs(a)
ans = a[0]
for i in range(1,n):
    ans = gcd(ans,a[i])
print(ans)

Failing test case input:
1 1
1110000100

Expected output:
1110000099


Actual output:
-1110000099


Fixed submission (verdict: Accepted):
n,x = map(int,input().split())
y = list(map(int,input().split()))
a = [abs(x-y[i]) for i in range(n)]
def gcd(a,b):
    return gcd(b,a%b) if b else abs(a)
ans = a[0]
for i in range(1,n):
    ans = gcd(ans,a[i])
print(ans)

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    c = a % b
    return gcd(b, c)

N, X = map(int, input().split())
xs = list(map(int, input().split()))
xs.append(X)
xs.sort()
D = xs[1] - xs[0]
for i in range(N):
    d = xs[i+1] - xs[i]
    if d < D:
        D = gcd(d, D)
    if D == 1:
        print(1)
        break
else:
    print(D)


Failing test case input:
3 81
33 42 57

Expected output:
3


Actual output:
9


Fixed submission (verdict: Accepted):
def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    c = a % b
    return gcd(b, c)

N, X = map(int, input().split())
xs = list(map(int, input().split()))
xs.append(X)
xs.sort()
D = xs[1] - xs[0]
for i in range(N):
    d = xs[i+1] - xs[i]
    D = gcd(d, D)
    if D == 1:
        print(1)
        break
else:
    print(D)

Problem: p03262
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
from math import gcd

n,x = map(int,input().split())
c = list(map(int,input().split()))
arr = []
for i in range(n-1):
    arr.append(abs(c[i]-c[i+1]))
if arr:
    ans = arr[0]
    if n>2:
        ans = gcd(arr[0],arr[1])
        for i in range(2,n-1):
            ans = gcd(ans,arr[i])
else:
    ans = c[0]-1
print(ans)

Failing test case input:
1 -4
1010001101

Expected output:
1010001105


Actual output:
1010001100


Fixed submission (verdict: Accepted):
from math import gcd

n,x = map(int,input().split())
c = list(map(int,input().split()))
c.append(x)
c.sort()
arr = []
for i in range(n):
    arr.append(abs(c[i]-c[i+1]))
ans = arr[0]
if n>1:
    ans = gcd(arr[0],arr[1])
    for i in range(2,n):
        ans = gcd(ans,arr[i])
print(ans)

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

def gcd(a,b):
    while b > 1:
        a, b = b, a % b
    return a

N, X = map(int,input().split())
k = [abs(int(x) - X) for x in input().split()] 
a = k[0]
for i in range(1,N):
    a = gcd(a,k[i])
print(str(a))

Failing test case input:
3 81
33 70 57

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):

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

N, X = map(int,input().split())
k = [abs(int(x) - X) for x in input().split()] 
a = k[0]
for i in range(1,N):
    a = gcd(a,k[i])
print(str(a))
Problem: p03262
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
import math
from functools import reduce


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))

def gcd_list(numbers):
    return reduce(math.gcd, numbers)



def main():
    n, x = nm()
    X = nl()
    X.append(x)
    ans = gcd_list(X)
    print(ans)



if __name__ == '__main__':
    main()

Failing test case input:
1 -1
1011001011

Expected output:
1011001012


Actual output:
1


Fixed submission (verdict: Accepted):
import sys
import math
from functools import reduce


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def gcd_list(numbers):
    return reduce(math.gcd, numbers)


def main():
    n, x = nm()
    X = nl()
    X.append(x)
    X = sorted(X)
    D = [X[i + 1] - X[i] for i in range(len(X) - 1)]
    ans = gcd_list(D)
    print(ans)


if __name__ == '__main__':
    main()

Problem: p03262
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,X = map(int,input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
Mindif = x[1]-x[0]
import math
for i in range(1,N-1):
    Mindif = math.gcd(Mindif,x[i+1]-x[i])
print(Mindif)

Failing test case input:
3 81
17 42 57

Expected output:
1


Actual output:
5


Fixed submission (verdict: Accepted):
N,X = map(int,input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
Mindif = x[1]-x[0]
import math
for i in range(1,N):
    Mindif = math.gcd(Mindif,x[i+1]-x[i])
print(Mindif)

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())
lst = list(map(int, input().split()))
ans = []
for i in lst:
    ans.append(abs(i-X))
small = min(ans)
for i in ans:
    if i%small == 0:
        continue
    else:
        print(1)
        exit()
print(small)

Failing test case input:
3 106
15 8 36

Expected output:
7


Actual output:
1


Fixed submission (verdict: Accepted):
N, X = map(int, input().split())
lst = list(map(int, input().split()))
ans = []
for i in lst:
    ans.append(abs(i-X))
small = min(ans)
for i in ans:
    if i%small != 0:
        while i%small != 0:
            i = i%small
            small = small - i
print(small)
Problem: p03262
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from math import gcd
n, x = map(int, input().split())
ls = sorted(list(map(int, input().split())))
if x == 1:
    print(abs(x-ls[0]))
    exit()
distant = []
for i in range(n):
    diff = abs(ls[i]-x)
    distant.append(diff)
distant.sort()
a = distant[0]
for i in distant:
    g = gcd(a, i)
print(g) 




Failing test case input:
3 106
15 8 36

Expected output:
7


Actual output:
14


Fixed submission (verdict: Accepted):
from math import gcd
n, x = map(int, input().split())
ls = sorted(list(map(int, input().split())))
if x == 1:
    print(abs(x-ls[0]))
    exit()
distant = []
for i in range(n):
    diff = abs(ls[i]-x)
    distant.append(diff)
distant.sort()
a = distant[0]
for i in distant:
    g = gcd(a, i)
    a = g
print(g)

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


import sys

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))
n=hoge[0]
x=hoge[1]

tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))

res = abs(x-hoge[0])
print(res)
for i in range(1,n):
	res=gcd(res, abs(hoge[i]-hoge[i-1]))
print(res)


Failing test case input:
1 0
1000000001

Expected output:
1000000001


Actual output:
1000000001
1000000001


Fixed submission (verdict: Accepted):


import sys

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))
n=hoge[0]
x=hoge[1]

tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))

res = abs(x-hoge[0])
for i in range(1,n):
	res=gcd(res, abs(hoge[i]-hoge[i-1]))
print(res)

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())
L = [int(i) for i in input().split()]

def gcd(x, y):
    while(y > 0):
        x, y = y, x%y
    return int(x)

l = X - L[0]
L.sort()
if N > 1:
    D = [L[i] - L[i-1] for i in range(1, N)]
    for i in range(N-1):
        l = gcd(l, D[i])

print(l)


Failing test case input:
1 -1
0010001001

Expected output:
10001002


Actual output:
-10001002


Fixed submission (verdict: Accepted):
N, X = map(int, input().split())
L = [int(i) for i in input().split()]

def gcd(x, y):
    while(y > 0):
        x, y = y, x%y
    return int(x)

l = abs(X - L[0])
L.sort()
if N > 1:
    D = [L[i] - L[i-1] for i in range(1, N)]
    for i in range(N-1):
        l = gcd(l, D[i])

print(l)

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

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

M = sorted([abs(i - X) for i in L])

m = min(M)

print(M)

if m == 0:
  print(m)
else:
  for i in range(0,len(M)):
    if M[i] % m > 0:
      print(1)
      break
  else:print(m)

Failing test case input:
1 0
1110000110

Expected output:
1110000110


Actual output:
[1110000110]
1110000110


Fixed submission (verdict: Accepted):

N,X = map(int,input().split())
L = list(map(int,input().split()))

M = [abs(i - X) for i in L]

def gcd(a,b):
    if b==0: 
        return a 
    return gcd(b,a%b)
    
D = 0 
for i in range(0,len(M)): 
    D = gcd(D,M[i])

print(D)
Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
n, X = map(int, sys.stdin.buffer.readline().split())
x = list(map(int, sys.stdin.buffer.readline().split()))
x.append(X)
x.sort()
ans = 10**12
for i in range(n):
    tmp = x[i+1] - x[i]
    if tmp < ans:
        ans = tmp
print(ans)

Failing test case input:
3 81
33 42 57

Expected output:
3


Actual output:
9


Fixed submission (verdict: Accepted):
import sys
def gcd(m, n):
    r = m % n
    return gcd(n, r) if r else n

n, X = map(int, sys.stdin.buffer.readline().split())
x = list(map(int, sys.stdin.buffer.readline().split()))
ans = abs(X - x[0])
for i in x[1:]:
    tmp = abs(X - i)
    if tmp % ans:
        ans = gcd(tmp, ans)
print(ans)

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,x=map(int,input().split())
X=[int(i) for i in input().split()]

def f(m,n):
  if min(m,n)<0:
    return f(abs(m),abs(n))
  elif m<n:
    return f(n,m)
  elif m%n==0:
    return n
  else:
    return f(n,m%n)
ans=X[0]-x
for i in range(1,n):
  ans=f(ans,X[i]-x)
print(ans)

Failing test case input:
1 3
2 5 11

Expected output:
1


Actual output:
-1


Fixed submission (verdict: Accepted):
n,x=map(int,input().split())
X=[int(i) for i in input().split()]

def f(m,n):
  if min(m,n)<0:
    return f(abs(m),abs(n))
  elif m<n:
    return f(n,m)
  elif m%n==0:
    return n
  else:
    return f(n,m%n)
ans=abs(X[0]-x)
for i in range(1,n):
  ans=f(ans,X[i]-x)
print(ans)

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def gcd(a, b):
    if (b == 0):
        return a
    return gcd(b, a % b)

n, x = map(int,input().split())
arr = list(map(int,input().split()))
diff = []
g = 0
for i in range(n-1):
    diff.append(abs(arr[i]-arr[i+1]))
for item in diff:
    g = gcd(g,item)
print(g)

Failing test case input:
1 1
1010001100

Expected output:
1010001099


Actual output:
0


Fixed submission (verdict: Accepted):
def gcd(a, b):
    if (b == 0):
        return a
    return gcd(b, a % b)

n, x = map(int,input().split())
arr = list(map(int,input().split()))
diff = []
arr.sort()
g = abs(arr[0] - x)
for i in range(1,n):
    g = gcd(g, abs(arr[i] - x))
print(g)

Problem: p03262
Buggy submission (Python (3.8.2), verdict: Wrong Answer):











def solve(n,x,a):
    delta_a = [a[i] - x for i in range(n)]
    d = max(delta_a)
    while d > 0:
        if all(k % d == 0 for k in delta_a):
            return d
        else:
            d -= 1
    return -1



def main():
    
    N,X = map(int,input().split())
    a = list(map(int,input().split()))
    print(solve(N,X,a))
    return

if __name__ == '__main__':
    main()


Failing test case input:
3 81
33 79 57

Expected output:
2


Actual output:
-1


Fixed submission (verdict: Accepted):

from math import gcd

from functools import reduce







def solve(n,x,a):
    delta_a = (abs(a[i] - x) for i in range(n))
    return reduce(gcd,delta_a)



def main():
    
    N,X = map(int,input().split())
    a = list(map(int,input().split()))
    print(solve(N,X,a))
    return

if __name__ == '__main__':
    main()
Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys

input = sys.stdin.readline
n, x = map(int, input().split())
a = input().split()

b = list(map(int, a))
b.append(x)
b.sort()
print(b)
minimum = b[1] - b[0]
for i in range(n):
    if i <= n - 1:
        if minimum > b[i + 1] - b[i]:
            minimum = b[i + 1] - b[i]

print(minimum)


Failing test case input:
1 0
1110000111

Expected output:
1110000111


Actual output:
[0, 1110000111]
1110000111


Fixed submission (verdict: Accepted):


import sys

input = sys.stdin.readline
n, x = map(int, input().split())
a = input().split()
b = list(map(int, a))
b.append(x)
b.sort()
if len(b) == 2:
    print(b[1] - b[0])
    exit(0)
c = [abs(a - x) for a in b]


def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a


ans = c[0]
for i in range(len(c)):
    ans = gcd(c[i], ans)
print(ans)

Problem: p03262
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,X = map(int,input().split())
x = list(map(int,input().split()))
if N == 1:
    print(abs(x[0]-X))
    exit()
x.sort()
Mindif = x[1]-x[0]
import math
for i in range(1,N-1):
    Mindif = math.gcd(Mindif,x[i+1]-x[i])
print(Mindif)

Failing test case input:
3 81
17 42 57

Expected output:
1


Actual output:
5


Fixed submission (verdict: Accepted):
N,X = map(int,input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
Mindif = x[1]-x[0]
import math
for i in range(1,N):
    Mindif = math.gcd(Mindif,x[i+1]-x[i])
print(Mindif)

Problem: p03262
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import bisect
N,X = map(int, input().split())
x = sorted(map(int, input().split()))
bisect.insort(x,X)
ans = [x[i+1]-x[i] for i in range(N-1)] 
if N ==1:
    print(x[1]-x[0])
else:
    print(min(ans))

Failing test case input:
3 81
33 3 57

Expected output:
6


Actual output:
24


Fixed submission (verdict: Accepted):
import bisect
import math
from functools import reduce

def gcd(A):
    return reduce(math.gcd, A)

N,X = map(int, input().split())
x = sorted(map(int, input().split()))
bisect.insort(x,X)
ans = [x[i+1]-x[i] for i in range(N)] 
if N ==1:
    print(x[1]-x[0])
else:
    print(gcd(ans))

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

n, X = map(int, input().split())
x = list(map(int, input().split()))

if len(x) == 1:
    print(abs(X - x[0]))
    exit()

x.append(X)
x.sort()

ans = float('inf')

for i in range(n-1):
    temp = x[i+1] - x[i]

    if ans > temp:
        ans = temp

print(ans)

Failing test case input:
1 3
1 5 11

Expected output:
2


Actual output:
inf


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

n, X = map(int, input().split())
x = list(map(int, input().split()))

if len(x) == 1:
    print(abs(X - x[0]))
    exit()


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

ans = 0
for i in range(n):
    ans = gcd(ans, abs(X - x[i]))
print(ans)
Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n,k = map(int,input().split())
x = list(map(int,input().split()))
ans = 10**11
t = 0
for i in range(n):
    t = abs(x[i]-k)
    if t==0:
        continue
    ans = min(ans,t)
print(ans)

Failing test case input:
3 81
17 42 57

Expected output:
1


Actual output:
24


Fixed submission (verdict: Accepted):

n,k = map(int,input().split())
x = list(map(int,input().split()))
ans = 0
t = 0

def gcd(a,b):
  while b:
    a,b = b,a%b
  return abs(a)

for i in range(n):
    t = abs(x[i]-k)
    ans = gcd(ans,t)
print(ans)

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

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

M = sorted([abs(i - X) for i in L])

m = min(M)

for i in range(0,len(M)):
  if M[i] % m != 0:
    print(1)
    break
else:print(m)

Failing test case input:
3 81
6 11 16

Expected output:
5


Actual output:
1


Fixed submission (verdict: Accepted):

N,X = map(int,input().split())
L = list(map(int,input().split()))

M = [abs(i - X) for i in L]

def gcd(a,b):
    if b==0: 
        return a 
    return gcd(b,a%b)
    
D = 0 
for i in range(0,len(M)): 
    D = gcd(D,M[i])

print(D)

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, X = map(int, input().split())
x = list(map(int, input().split()))
x = sorted(x)
D = [x[i + 1] - x[i] for i in range(len(x) - 1)]



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


if len(x) == 1:
    print(abs(X - x[0]))
    exit()

ans = 0
for i in range(len(D)):
    if i == 0:
        ans = D[i]
    else:
        ans = gcd(D[i], ans)
print(ans)


Failing test case input:
1 3
2 5 11

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
N, X = map(int, input().split())
x = list(map(int, input().split()))
x.append(X)
x = sorted(x)
D = [x[i + 1] - x[i] for i in range(len(x) - 1)]



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


if len(x) == 1:
    print(x[0])
    exit()


ans = 0
for i in range(len(D)):
    if i == 0:
        ans = D[i]
    else:
        ans = gcd(D[i], ans)
print(ans)

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, x = map(int, input().split())
c = list(map(int, input().split()))
c = set([abs(x-c[i]) for i in range(n)])
l = min(c)
f = [l]
if n > 1:
    for i in range(1, l):
        if l % i == 0:
            f.append(i)
for i in range(len(f), 0, -1):
    d = True
    for item in c:
        if item % f[i-1] != 0:
            d = False
    if d:
        print(f[i-1])
        break

Failing test case input:
3 3
1 7 11

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
n, x = map(int, input().split())
c = list(map(int, input().split()))
c = set([abs(x-c[i]) for i in range(n)])
l = min(c)
for i in range(l+1, 0, -1):
    if l % i == 0:
        d = True
        for item in c:
            if item % i != 0:
                d = False
        if d:
            print(i)
            break
Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X=map(int,input().split())
x=list(map(int,input().split()))
L=x+[X]
if N==1:
	print(abs(X-x[0]))
else:
	LL=[abs(L[i+1]-L[i]) for i in range(N)]
	MAX=1
	while all([l%(MAX+1)==0 for l in LL]):
		MAX+=1
	print(MAX)


Failing test case input:
3 81
33 3 57

Expected output:
6


Actual output:
3


Fixed submission (verdict: Accepted):
from functools import reduce
N,X=map(int,input().split())
x=list(map(int,input().split()))
L=x+[X]
if N==1:
	print(abs(X-x[0]))
else:
	LL=[abs(L[i+1]-L[i]) for i in range(N)]
	def gcd(a,b):
		while b>0:
			a,b=b,a%b
		return a
	print(reduce(gcd,LL))

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

n, X = map(int, input().split())
x = list(map(int, input().split()))

if len(x) == 1:
    print(abs(X - x[0]))
    exit()

x.append(X)
x = list(set(x))
x.sort()

ans = float('inf')

for i in range(n-1):
    temp = x[i+1] - x[i]

    if ans > temp:
        ans = temp

print(ans)

Failing test case input:
3 81
33 3 57

Expected output:
6


Actual output:
24


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

n, X = map(int, input().split())
x = list(map(int, input().split()))

if len(x) == 1:
    print(abs(X - x[0]))
    exit()


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

ans = 0
for i in range(n):
    ans = gcd(ans, abs(X - x[i]))
print(ans)

Problem: p03262
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math

n, x = map(int, input().split(" "))
xL = sorted(list(map(int, input().split(" "))) + [x])

diff = [0 for _ in range(n)]
for i in range(n):
    diff[i] = xL[i + 1] - xL[i]

ans = 0
for d in diff:
    ans = max(math.gcd(diff[0], d), ans)

print(ans)

Failing test case input:
3 107
2 92 77

Expected output:
15


Actual output:
75


Fixed submission (verdict: Accepted):
import math

n, x = map(int, input().split(" "))
xL = sorted(list(map(int, input().split(" "))) + [x])

diff = [0 for _ in range(n)]
for i in range(n):
    diff[i] = xL[i + 1] - xL[i]

ans = diff[0]
for d in diff:
    ans = math.gcd(ans, d)

print(ans)

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

x.append(X)
x.sort()

d = []
for i in range(N):
    d.append(x[i + 1] - x[i]) 

d.sort()

D = d[0]
for i in range(len(d) - 1):
    if d[i + 1] % D != 0:
        for j in range(int(D ** 0.5), 1, -1):

            if d[i + 1] % D == 0:
                D = d[i + 1]
                continue

    if D == 1:
        break

print(D)


Failing test case input:
3 81
17 42 57

Expected output:
1


Actual output:
15


Fixed submission (verdict: Accepted):
import sys

N, X = map(int, input().split())
x = list(map(int, input().split()))

x.append(X)
x.sort()

d = []
for i in range(N):
    d.append(x[i + 1] - x[i]) 

d.sort()

def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a

D = d[0]
for i in range(len(d) - 1):
    D = gcd(d[i + 1], D)



print(D)
Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X=map(int, input().split())
x=list(map(int, input().split()))

def gcd(a,b):
    while b:
        a, b = b, a % b
    return a

x.append(X)
x.sort()

ans=x[1]-x[0]

for i in range(N-1):
    ans=gcd(ans,x[i+1]-x[i])

print(ans)

Failing test case input:
3 81
17 42 57

Expected output:
1


Actual output:
5


Fixed submission (verdict: Accepted):
N,X=map(int, input().split())
x=list(map(int, input().split()))
 
def gcd(a,b):
    while b:
        a, b = b, a % b
    return a

x.append(X)
x.sort()
 
ans=x[1]-x[0]
 
for i in range(N):
    ans=gcd(ans,x[i+1]-x[i])

print(ans)

Problem: p03262
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)


import sys

N,X = map(int, input().split())
x = list(map(int, input().split()))


x_div =[]
for i in range(N-1):
    x_div.append(abs(x[i] -x[i+1]))


if N ==1:
    ans =x[0] -X
else:
    ans =gcd_list(x_div)
print(ans)

Failing test case input:
3 81
17 42 57

Expected output:
1


Actual output:
5


Fixed submission (verdict: Accepted):

import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)


import sys

N,X = map(int, input().split())
x = list(map(int, input().split()))


x_div =[abs(X-x[0])] 
for i in range(N-1):
    x_div.append(abs(x[i] -x[i+1]))


if N ==1:
    ans =abs(x[0] -X)
else:
    ans =gcd_list(x_div)
print(ans)

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def gcd(a,b):
    while b!=0:
        a,b = b,b%a
    return a
def lcm(a,b):
    return (a*b)

N,X = map(int,input().split())
x = list(map(int,input().split()))
x = list(map(lambda q:abs(q-X),x))

for xx in x:
    ans = lcm(x[0],xx)
print(ans)

Failing test case input:
1 0
1000000001

Expected output:
1000000001


Actual output:
1000000002000000001


Fixed submission (verdict: Accepted):
def gcd(a,b):
    while b!=0:
        a,b = b,a%b
    return a
def lcm(a,b):
    return (a*b)

N,X = map(int,input().split())
x = list(map(int,input().split()))
x = list(map(lambda q:abs(q-X),x))
ans = x[0]
for xx in x:
    ans = gcd(ans,xx)
print(ans)
Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N ,X = list(map(int,input().strip().split()))
xlist = list(map(int,input().strip().split()))
xlist_2 = list(map(lambda x:abs(X - x), xlist))
flg = 0

sum = sum(xlist_2)
min = min(xlist_2)




for i in range(N):
    if sum % (min - i) == 0:
        print(min - i)
        flg = 1
        break
if flg == 0:
    print(1)


Failing test case input:
3 81
33 3 57

Expected output:
6


Actual output:
1


Fixed submission (verdict: Accepted):
def gcd(a,b):
    while b % a:
        a,b = b, a % b
    return a


N ,X = list(map(int,input().strip().split()))
xlist = list(map(int,input().strip().split()))
abs_xlist = list(map(lambda x:abs(X - x), xlist))
abs_xlist.sort()
ans = abs_xlist[0]

for i in range(N):
    if abs_xlist[i] % ans != 0:
        num = gcd(abs_xlist[i],ans)
        ans = min(num,ans)
print(ans)

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def euclid(x, y):
    if(y != 0):
        tmp = y
        y = x % tmp
        x = tmp
        return euclid(x,y)
    else:
        return x
    
def main():
    N, X = map(int, input().split())
    x= list(map(int, input().split()))
    
    D = 10**10
    if(X > 1):
        for i in range(1, N):
            D = min(D, euclid(abs(x[i]-X), abs(x[i-1]-X)))     
        print(D)
    else:
        D = abs(x[0]-X)
        print(D)
main()

Failing test case input:
1 3
1001001000

Expected output:
1001000997


Actual output:
10000000000


Fixed submission (verdict: Accepted):
def euclid(x, y):
    if(y != 0):
        tmp = y
        y = x % tmp
        x = tmp
        return euclid(x,y)
    else:
        return x
    
def main():
    N, X = map(int, input().split())
    x= list(map(int, input().split()))
    
    if(N > 1):
        D = 10**10
        for i in range(1, N):
            D = min(D, euclid(abs(x[i]-X), abs(x[i-1]-X)))     
        print(D)
    else:
        ans = abs(x[0]-X)
        print(ans)
main()

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def gcd(a,b):
  while b:
    a,b = b, a % b
    return a

N,X=map(int,input().split())
x=list(map(int,input().split()))

ans = x[0] - X

for i in range(1,N):
  ans = gcd(ans, x[i] - X)

print(abs(ans))

Failing test case input:
3 81
33 42 57

Expected output:
3


Actual output:
24


Fixed submission (verdict: Accepted):
def gcd(a,b):
  while b:
    a,b = b, a % b
  return a

N,X=map(int,input().split())
x=list(map(int,input().split()))

ans = x[0] - X

for i in range(1,N):
  ans = gcd(ans, x[i] - X)

print(abs(ans))
Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) 

n, X = map(int, input().split())
x = list(map(int, input().split()))
if len(x) == 1:
  print(abs(x[0] - X))
else:
  x.sort()
  s = x[1] - x[0]
  for i in range(1, n-1):
    s = gcd(s, x[i+1]-x[i])
    print(s)
  a = 1
  for i in range(n):
    a = max(a, gcd(abs(X-x[i]), s))
  print(a)

Failing test case input:
3 81
33 73 57

Expected output:
8


Actual output:
8
8


Fixed submission (verdict: Accepted):
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) 

n, X = map(int, input().split())
x = list(map(int, input().split()))
if len(x) == 1:
  print(abs(x[0] - X))
else:
  x.sort()
  s = x[1] - x[0]
  for i in range(1, n-1):
    s = gcd(s, x[i+1]-x[i])
  a = 1
  for i in range(n):
    a = max(a, gcd(abs(X-x[i]), s))
  print(a)

Problem: p03262
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,X=map(int,input().split())
import math
a=list(map(int,input().split()))
a.append(X)
a.sort()
S=[]
for i in range(N):
    S.append(a[i+1]-a[i])

    
ans=S[0]
for j in range(1,N):
    math.gcd(ans,S[j])
    
print(ans)


Failing test case input:
3 107
2 92 77

Expected output:
15


Actual output:
75


Fixed submission (verdict: Accepted):
N,X=map(int,input().split())
import math
a=list(map(int,input().split()))
a.append(X)
a.sort()
S=[]
for i in range(N):
    S.append(a[i+1]-a[i])

    
ans=S[0]
for j in range(1,N):
    ans=math.gcd(ans,S[j])
    
print(ans)

Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,X = map(int,input().split())
L = list(map(int,input().split()))

M = [abs(i - X) for i in L]

D = []


for m in range(0,len(M)):
  for i in range(0,len(M)):
    if M[m] % M[i] == 0:
      D.append(M[m])
      
print(max(D))


Failing test case input:
3 81
33 61 57

Expected output:
4


Actual output:
48


Fixed submission (verdict: Accepted):

N,X = map(int,input().split())
L = list(map(int,input().split()))

M = [abs(i - X) for i in L]

def gcd(a,b):
    if b==0: 
        return a 
    return gcd(b,a%b)
    
D = 0 
for i in range(0,len(M)): 
    D = gcd(D,M[i])

print(D)
Problem: p03262
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num_str=input().split()
num=list(map(int, num_str))
n=num[0]
x=num[1]
num2_str=input().split()
distance=list(map(int, num2_str))

first_distance=list(map(lambda y:abs(y-x),distance))
min_distance=min(first_distance)


for i in range(min_distance,0,-1):
    Can_go_list=list(map(lambda z:z%i,first_distance))

    if 0 not in Can_go_list:
        ans = i
        print(ans)
        break

Failing test case input:
1 1
1000010000

Expected output:
1000009999


Actual output:
1000009998


Fixed submission (verdict: Accepted):
num_str=input().split()
num=list(map(int, num_str))
n=num[0]
x=num[1]
num2_str=input().split()
distance=list(map(int, num2_str))

first_distance=list(map(lambda y:abs(y-x),distance))
min_distance=min(first_distance)

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


if n==1:
    print(first_distance[0])
else:
    element = gcd(first_distance[0], first_distance[1])
    if n==2:print(element)
    else:
        for i in range(2,n):
            element=gcd(element,first_distance[i])
        print(element)
Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = int(input())
if s/100==7:
    print("Yes")
elif s/10==7:
    print("Yes")
elif s%100==7:
    print("Yes")
else:
    print('NO')

Failing test case input:
739

Expected output:
Yes


Actual output:
NO


Fixed submission (verdict: Accepted):
s = int(input())
t=s
if s
    print("Yes")
elif t%10==7:
    print("Yes")
elif s%10==7:
    print("Yes")
else:
    print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()
b = str(a)
print(b)
if '7' in b:
  print('Yes')
else:
  print('No')

Failing test case input:
2610

Expected output:
No


Actual output:
2610
No


Fixed submission (verdict: Accepted):
a = input()
b = str(a)
if '7' in b:
  print('Yes')
else:
  print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = list(input())
if 7 in N:
    print('Yes')
else:
    print('No')

Failing test case input:
3557

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = list(input())
if '7' in N:
    print('Yes')
else:
    print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

def import_number():
    return int(input())


def import_int(n):
    return [int(input()) for i in range(n)]

n = import_number()
tmp = n % 100
if n / 100 == 7:
    print('Yes')
elif tmp / 10 == 7:
    print('Yes')
elif tmp % 10 == 7:
    print('Yes')
else:
    print('No')


Failing test case input:
2578

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

def import_number():
    return int(input())


def import_string():
    return str(input())


def import_int(n):
    return [int(input()) for i in range(n)]

N = import_string()
if '7' in N:
    print('Yes')
else:
    print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
if n[-1] or n[-2] or n[-3] == 7:
    print("Yes")
else:
    print("No")

Failing test case input:
818

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = input()
if n[-1]=='7' or n[-2]=='7' or n[-3]=='7':
    print('Yes')
else:
    print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = str(input())

for i in range(len(n)):
  if n[i]=="7":
    print("Yes")
  if i == len(n)-1:
    print("No")

Failing test case input:
2578

Expected output:
Yes


Actual output:
Yes
No


Fixed submission (verdict: Accepted):
n = str(input())

for i in range(len(n)):
  if n[i]=="7":
    print("Yes")
    break
  if i == len(n)-1:
    print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = list(str(input()))
re = False
for i in range(len(k)):
  if i == '7':
    re = True
    
if re:
  print('Yes')
else:
  print('No')

Failing test case input:
947

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
k = list(str(input()))
re = False
for i in k:
  if i == '7':
    re = True
    
if re:
  print('Yes')
else:
  print('No')
Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = list(input())
if '7' in n:
  print('YES')
else:
  print('NO')

Failing test case input:
380

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n = list(input())
if '7' in n:
  print('Yes')
else:
  print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
print('Yes') if n in '7' else print('No')

Failing test case input:
947

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n = input()
print('Yes') if '7' in n else print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from math import *

N= int(input())

a = floor(N/100)
b=floor((N-a)/10)
c=N%10

if a==7 or b==7 or c==7 :
    print("Yes")
else:
    print("No")


Failing test case input:
2578

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):


from math import *

N= int(input())

a = floor(N/100)
b=floor((N-a*100)/10)
c=N%10

if a==7 or b==7 or c==7 :
    print("Yes")
else:
    print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = list(input())
j = 0
for i in x:
  if int(i) != 7:
    j = 1

if j == 0:
  print('Yes')
else:
  print('No')

Failing test case input:
739

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
x = list(input())
j = 0
for i in x:
  if int(i) == 7:
    j = 1

if j == 1:
  print('Yes')
else:
  print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = list(input())
j = 0
for i in x:
  print(i)
  if int(i) != 7:
    j = 1

if j == 0:
  print('Yes')
else:
  print('No')

Failing test case input:
2610

Expected output:
No


Actual output:
2
6
1
0
No


Fixed submission (verdict: Accepted):
x = list(input())
j = 0
for i in x:
  if int(i) == 7:
    j = 1

if j == 1:
  print('Yes')
else:
  print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = list(input())
print(N)
if "7" in N:
    print("Yes")
else:
    print("No")

Failing test case input:
612

Expected output:
No


Actual output:
['6', '1', '2']
No


Fixed submission (verdict: Accepted):
N = list(input())
if "7" in N:
    print("Yes")
else:
    print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()

if "7" in n:
    print("YES")
else:
    print("NO")

Failing test case input:
739

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
n = input()

if "7" in n:
    print("Yes")
else:
    print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

S = input()

S_list = list(S)

ans = 0
for i in range(len(S_list)):
  if(S_list[i] == "7"):
    ans = 7
  else:
    ans = 0
    
    
    
if(ans == 7):
  print("Yes")
else:
  print("No")

Failing test case input:
739

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

S = input()

S_list = list(S)

ans = 0
for i in range(len(S_list)):
  if(S_list[i] == "7"):
    ans = 7
  else:
    ans = ans
    
    
    
if(ans == 7):
  print("Yes")
else:
  print("No")
Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
param = input()

ret = None
if param in '7':
  ret = 'Yes'
else:
  ret = 'No'
  
print(f'{ret}')

Failing test case input:
3557

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
param = input()

ret = None
if '7' in param:
    ret = 'Yes'
else:
    ret = 'No'

print(f'{ret}')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    n = s_input()
    if "7" in n:
        print("yes")
    else:
        print("No")




if __name__=="__main__":
    main()


Failing test case input:
739

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    n = i_input()
    n = str(n)
    if "7" in n:
        print("Yes")
    else:
        print("No")




if __name__=="__main__":
    main()

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from sys import stdin
import math
import fractions

n = stdin.readline().rstrip()

if n in '7':
    print('Yes')
else:
    print('No')

Failing test case input:
2578

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
from sys import stdin
import math
import fractions

n = stdin.readline().rstrip()

if '7' in n:
    print('Yes')
else:
    print('No')

Problem: p02711
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a=int(input())
if "7" in "str(a)":
    print("Yes")
else:
    print("No")

Failing test case input:
3557

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a=int(input())
if "7" in str(a):
    print("Yes")
else:
    print("No")
Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
flag = 0
for i in range(3):
  t = n%10
  if t == 7:
    print("YES")
    flag = 1
    break
  n = n/10
if flag == 0:
  print("NO")

Failing test case input:
1149

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n = int(input())
flag = 0
for i in range(3):
  t = n%10
  if t == 7:
    print("Yes")
    flag = 1
    break
  n = int(n/10)
if flag == 0:
  print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
data=[10**i for i in range(1,3+1)]
for i in data:
  if n%i/(i/10)==7:
    print("Yes")
    exit()
print("No")

Failing test case input:
2578

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n=int(input())
data=[10**i for i in range(1,3+1)]
for i in data:
  if n%i==7*(i/10):
    print("Yes")
    exit()
  n-=n%i
print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

  
N = input()
for i in N:
    if i == '7':
        print('Yes')
        break
        
print('No')

Failing test case input:
739

Expected output:
Yes


Actual output:
Yes
No


Fixed submission (verdict: Accepted):

  
N = input()
flag = 'No'
for i in N:
    if i == '7':
        flag = 'Yes'
        
print(flag)

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
li = map(int, list(str(n)))
if '7' in li:
    print('Yes')
else:
    print('No')

Failing test case input:
739

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())
li = list(str(n))
if '7' in li:
    print('Yes')
else:
    print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
if '7' in s:
    print("YES")
else:
    print("NO")


Failing test case input:
739

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
s = input()
if '7' in s:
    print("Yes")
else:
    print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())

n = str(n)

flag = 0

for i in n:
  if(i != '7'):
    flag = 0
  else:
    flag = 1

    
print(flag)



Failing test case input:
2578

Expected output:
Yes


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
 
n = str(n)
 
flag = 0
 
for i in n:
  if(i != '7'):
    flag = 0
  else:
    flag = 1
    break
 
    
if flag == 0:
  print('No')
else :
  print('Yes')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print("YES" if "7" in input() else "NO")

Failing test case input:
1149

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
print("Yes" if "7" in input() else "No")
Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
f=0
c=0
while n>0:
      c=n%10
      if c==7:
           f=1
           print("Yes")
      n=n/10
if f==0:
      print("No")
  


Failing test case input:
739

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n=int(input())
f=0
while n>0:
      c=n%10
      if  c==7:
            f=1
            print("Yes")
            break
      n=int(n/10)
if f==0:
      print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=input()
ans='No'
for i in a:
  if i==7:
    ans='Yes'
print(ans)

Failing test case input:
947

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a=input()
ans='No'
for i in a:
  if i=='7':
    ans='Yes'
    break
print(ans)

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
if n in "7":
    print("Yes")
else:
    print("No")

Failing test case input:
3557

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n = input()
if "7" in n:
    print("Yes")
else:
    print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()
print (N[1])
s = [N[i] for i in range(len(N))]
sw = False
for i in range(len(s)):
    if s[i] == "7":
        sw = True

if sw == True:
    print("Yes")
else:
    print("No")


Failing test case input:
947

Expected output:
Yes


Actual output:
4
Yes


Fixed submission (verdict: Accepted):
N = input()
s = [N[i] for i in range(len(N))]
sw = False
for i in range(len(s)):
    if s[i] == "7":
        sw = True

if sw == True:
    print("Yes")
else:
    print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()

for i in N:
    if i == '7':
        print('Yes')
    else:
        print('No')

Failing test case input:
2610

Expected output:
No


Actual output:
No
No
No
No


Fixed submission (verdict: Accepted):
N = input()
flg = False

for i in N:
    if i == '7':
        flg = True
if flg:
    print('Yes')
else:
    print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()

if N[-1] == 7 or N[-2] == 7 or N[-3] == 7:
    print("Yes")
else:
    print("No")

Failing test case input:
947

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = input()

if N[-1] == "7" or N[-2] == "7" or N[-3] == "7":
    print("Yes")
else:
    print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math

n = (int)(input())

ret = False
while n > 0:
    if n % 10 == 7:
        ret = True
        break
    n = math.floor(n / 10)

print("{}".format(ret))

Failing test case input:
380

Expected output:
No


Actual output:
False


Fixed submission (verdict: Accepted):
import math

n = (int)(input())

ret = "No"
while n > 0:
    if n % 10 == 7:
        ret = "Yes"
        break
    n = math.floor(n / 10)

print("{}".format(ret))
Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()
for i in N:
  if i =="7":
    ans = "Yes"
  else:
    ans = "No"
print(ans)

Failing test case input:
739

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = input()
ans = "No"
for i in N:
  if i =="7":
    ans = "Yes"
    break
print(ans)

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = map(int, list(input()))
if 7 in N:
    print("yes")
else:
    print("no")

Failing test case input:
818

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
N = map(int, list(input()))
if 7 in N:
    print("Yes")
else:
    print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()
if N.find('7'):
    print('Yes')
else:
    print('No')

Failing test case input:
612

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

N = input()

Sev = '7'

if Sev in N:
    print('Yes')
else:
    print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=list(str(input()))
if '7' in n:
    print('yes')
else:
    print('No') 

Failing test case input:
2578

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
n=list(str(input()))
if '7' in n:
    print('Yes')
else:
    print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()

if "7" in n:
    print("YES")
else:
    print("NO")


Failing test case input:
818

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n = input()

if "7" in n:
    print("Yes")
else:
    print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
i = input()
s = str(i)
print(s[-1])
if s[-1] == "7":
    print("Yes")
elif s[-2] == "7":
    print("Yes")
elif s[-3] == "7":
    print("Yes")
else:
    print("No")

Failing test case input:
380

Expected output:
No


Actual output:
0
No


Fixed submission (verdict: Accepted):
i = input()
s = str(i)
if s[-1] == "7":
    print("Yes")
elif s[-2] == "7":
    print("Yes")
elif s[-3] == "7":
    print("Yes")
else:
    print("No")

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=input().count('7')
if n>0:
  print('YES')
else:
  print('NO')

Failing test case input:
3557

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
n=input().count('7')
if n>0:
  print('Yes')
else:
  print('No')

Problem: p02711
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
b = 0
for i in n:
    if i == '7':
        b= 1
        break

if b == 1:
    print("YES")
else:
    print("NO")

Failing test case input:
739

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
n = input()
b = 0
for i in n:
    if i == '7':
        b= 1
        break

if b == 1:
    print("Yes")
else:
    print("No")