added code for Uva:594
Merge pull request #11 from rahulroot/594-code

added code for Uva:594