Answer to Question #284533 in C++ for Collay

Question #284533

Needle in the Haystack

by CodeChum Admin


Let's now try finding a certain digit into an integer! Come and join in on the fun and code with me!






Instructions:


Input two integers in one single line. The first inputted integer must be within 0-9 only.

Using loops, identify if the first inputted integer (0-9) is present in the second inputted integer. If it is found, print "Yes"; otherwise, print "No". Tip: If the number is already found even without reaching the end of the loop, use the break keyword to exit the loop early for a more efficient code.

Input


A line containing two integers separated by a space.


1·231214238

Output


A single line containing a string.


Yes


1
Expert's answer
2022-01-03T14:24:29-0500
a, b = map(str, input().split())
test = True
for i in b:
    if i == a:
        test = False


if test: print("No")
else: print("Yes")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog