私の解答
values = input().split()
N = int(values[0])
M = int(values[1])
li = [int (x) for x in input().split()]
output = False
for ele in li:
if ele == M:
print("Yes")
output = True
break
if not output:
print("No")
解答例
values = input().split()
N = int(values[0])
M = int(values[1])
A = [0] * N
values = input().split()
for i in range(N):
A[i] = int(values[i])
output = False
for ele in A:
if M == ele:
print("Yes")
output = True
break
if not output:
print("No")