Hackerrank Oct'13 Challenge: 2 easy problems