# TENNIS COURT

QUESTION

Many of the current final year students of a college are excellent tennis players. They always emerge as champions in the State Level Inter-Collegiate Tennis Meet. They want their juniors to carry on their legacy in the field of tennis and they started training their juniors in tennis. They were happy to see them play very well during their coaching sessions. They had a very comfortable win over one of the top teams in the game played at their college. But to their dismay, their juniors performed very poorly in the games conduced at other venues.\n\nThe think-tank of the College Tennis club was pondering over the reasons for their poor performance in the meets. David came up with a possible reason for the poor performance of their junior team. The tennis court in their college is a grass court but the tennis courts in most other competitive venues are synthetic courts. Their junior team has learnt playing tennis in the grass court and they found it very difficult to adapt their game to synthetic courts. The entire team agreed with this reason and they planned to request the chairman to convert the grass tennis court to synthetic tennis court.\n\nThey sent a request to the Chairman and he readily agreed but he asked to do it with minimal expenditure. He gave them square stones.\n\nThe 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.\n\nWhat 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.\n\nInput Format:\nInput 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.\nOutput Format:\nOutput consists of ta single integer k, where k is the least number of stones needed.\n.

“TESTCASE_1”: “6\n6\n4\n###—###SEPERATOR—###—\n4”, “TESTCASE_2”: “4\n3\n5\n###—###SEPERATOR—###—\n1”, “TESTCASE_3”: “4\n14\n5\n###—###SEPERATOR—###—\n3”, “TESTCASE_4”: “0\n###—###SEPERATOR—###—\n0”, “TESTCASE_5”: “0\n###—###SEPERATOR—###—\n0

``````#include<stdio.h>
#include<math.h>
int main(){
int l,b,la,ba,plate,a;
scanf("%d",&l);
scanf("%d",&b);
scanf("%d",&a);
la=round((float)l/a);
ba=round((float)b/a);
plate=la*ba;
printf("%d",plate);
return 0;
}``````