And Product Hackerrank Solution