Solutions of Hackerrank using python