Karthik's submission of Count the squares | CodeChef