added code for Uva:11388
Merge pull request #15 from rahulroot/11388-code

added code for Uva:11388