Sunday, 23 April 2017

4.TENNIS COURT

TENNIS COURT


They sent a request to the Chairman and he readily agreed but he asked to do it with minimal expenditure. He gave them square stones.

The tennis court in the college is rectangular in shape of size n*m metres. We need to pave the court with square stones. The square stone is of size a*a.

What is the least number of stones needed to pave the tennis court? It's allowed to cover the surface larger than the Tennis Court, but the court has to be covered. It's not allowed to break the stones. The sides of stones should be parallel to the sides of the court.
Input Format:
Input consists of 3 integers. The first integer corresponds to 'n', the length of the court. The second integer corresponds to 'm', the width of the court. The third integer corresponds to 'a', the side of the square stone.
Output Format:
Output consists of ta single integer k, where k is the least number of stones needed.

code:


No comments:

Post a Comment