Wednesday, January 20, 2016

Codeforces : Theatre Square Solution

 Codeforces : Theatre Square Solution


//Author: Humaun Kabir
#include<stdio.h>
#include<math.h>
int main()
{
    double n,m,a;
    double ans;
  
    while(scanf("%lf %lf %lf",&n,&m,&a)==3){
  
        double row = ceil(n/a);
        double column = ceil(m/a);
  
        ans =row * column;
  
        printf("%.0lf\n",ans);
  
    }
    return 0;
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)