1A Theatre Square
题目大意;
有一个广场,广场的大小是n*m, 有a*a的石砖,石砖铺广场可以比广场大,石砖不能切割。问最少需要多少个石砖。
=====================================================================
#include <iostream> #include <cmath> #include <algorithm> #include <string> #include <deque> #include <cstring> #include <cstdio> #include <vector> #include <set> #include <map> #include <queue> #include <cstdlib> using namespace std; typedef long long LL; const LL INF = 0xffffff; const int maxn = 201315; const LL MOD = 1e9+7; int main() { LL n, m, a, x, y; cin >> n >> m >> a; x = (n + a - 1)/a; y = (m + a - 1)/a; cout << x * y << endl; return 0; }