hackerrank solutions by ryosy383