题目大意;

有一个广场,广场的大小是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;
}

 

相关文章:

  • 2021-08-11
  • 2022-12-23
  • 2021-06-13
  • 2021-08-24
  • 2022-12-23
  • 2021-12-31
  • 2021-12-02
猜你喜欢
  • 2021-11-05
  • 2021-10-01
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-02
相关资源
相似解决方案