added code for Uva:11385
Merge pull request #14 from rahulroot/11385-code

added code for Uva:11385