1A - Theatre Square

#include 
using namespace std;
int main()
{
    int n,m,a,c=1,d=1,sum=0;
    cin >> n >> m >> a;
    if(n%a==0)
    {
        c=0;
    }
    if(m%a==0)
    {
        d=0;
    }
    sum=((n/a+c)*(m/a+d));
    cout << sum << endl;
}

你可能感兴趣的:(1A - Theatre Square)