added code for Uva:11044
Merge pull request #20 from rahulroot/11044-code

added code for Uva:11044