codeforces.com/problemset/problem/1/A
题意:有n*m的剧院,需要用多少a*a的石板才能铺满。(石板不能裁剪)
(1 ≤n, m, a ≤ 10^9).
最大情况为10^18
C
#include <stdio.h>
typedef long long int64;
int main()
{
int n,m,a;
int64 stonesX,stonesY;
while(scanf("%d %d %d",&n,&m,&a)!=EOF){
stonesX = n > a ? (n+a-1)/a : 1;
stonesY = m > a ? (m+a-1)/a : 1;
printf("%I64d\n",stonesX*stonesY);
}
return 0;
}