hackerrank submission 1