Advertisement
Guest User

theatre square

a guest
Jul 4th, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.    int n,m,a,s;
  7.     scanf("%d%d%d",&n,&m,&a);
  8.    {if(n%a==0){
  9.         n=n/a;
  10.     }
  11.     else{
  12.         n=n/a+1;
  13.     }
  14.     }
  15.     {if(m%a==0){
  16.         m=m/a;
  17.     }
  18.     else{
  19.         m=m/a+1;
  20.     }
  21.     }
  22.     s=n*m;
  23.     printf("%d",s);
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement