added code for Uva-10018
Merge pull request #5 from rahulroot/10018-code

 added code for Uva-10018