Company: Mtx_12nov
Difficulty: medium
Gogo's Valid Numbers Problem Description Gogo, a supplier of rare raw materials, provides his goods to the ingenious Dr. Hell for scientific endeavors. Danny, responsible for handling payments on behalf of Dr. Hell, receives a secret code from him. This secret code serves as the key to unlocking the due payments for Gogo's supplies. To receive the rightful payments, Gogo must present the secret code to Danny. In turn, Danny hands Gogo a list of numbers. However, only specific numbers in the list, denoted by a single common factor of 1 with both the secret code and the number itself, are eligible for payment. This process of manually selecting the valid numbers from the list became increasingly cumbersome for Gogo. Hence, he seeks your assistance in creating a program. The program should take the secret code (X) and a list of numbers (A) of size N as input. It must then produce a list of valid numbers that meet the specified condition. Illustrate the same by reading the input from STDIN