Im new to ruby .Please correct my mistakes in CHEFSTEP

x=gets.chomp().to_i
for _ in 1…(x)
arr=gets.chomp()
n=arr.split(" “)
n.map!(&:to_i)
a=gets.chomp()
new=a.split(” ")
new.map!(&:to_i)
for i in new
if(i%n[1]==0)
print(‘1’)
else
print(‘0’)
end
end
end