def ascan; gets.split.map(&:to_i); end def scan; gets.to_i; end gets; a = gets.chomp.split b = gets.chomp.split a.size.times{|i| if a[i] != b[i] p i+1 puts a[i],b[i] end }