Soultion of Hackerrank SMVDU Challenge 1