CF1A-Theatre Square

CF1A-Theatre Square

  1. Meaning of the questions: \ (the n-* m \) paved area \ (a * a \) bricks, requires a minimum of number.

  2. Ideas: to the rounded, \ (ANS = ((n-+. 1-A) / A) * ((m +. 1-A) / A) \)

  3. Code:

    #include<bits/stdc++.h>
    using namespace std;
    typedef long long ll;
    int main(void){
        ll n,m,a;
        cin >> n >> m >> a;
        cout<<((n+a-1)/a)*((m+a-1)/a)<<endl;
        return 0;
    }

Guess you like

Origin www.cnblogs.com/AC-AC/p/12234209.html