Hacker Block PRoblems

HI sir, I have been having an issue in solving the hacker blocks, usually run time errors, for instance,
def find_gcd(x, y):
while(y):
x, y = y, x % y

return x 

x = int(input())
l = [int(i) for i in input().split(’ ')]

num1=l[0]
num2=l[1]
gcd=find_gcd(num1,num2)

for i in range(2,len(l)):
gcd=find_gcd(gcd,l[i])

print(gcd)

Can you help me with it?

Can you please share the code with me by saving it at the given below link and sharing it with me so I can look into it as in the above mentioned code the intentation are not clear.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.