Add solution to problem 32. This code looks complicated and should be refactored later.
Add solution to problem 32. This code looks complicated and should be refactored
later.

advancedxy/hackerrank,advancedxy/hackerrank,advancedxy/hackerrank