Hacker Rank :  refactor : formatting