added code for Uva:195
Merge pull request #10 from rahulroot/195-code

added code for Uva:195