Popular Posts

Codeforces Solve

A. Theatre Square:

#include<stdio.h>

int main()
{
    int m,n,a;
    long long int flgrow,flgcol;
    scanf("%d %d %d",&n,&m,&a);
    if(n%a==0)
    {
       flgrow=(n/a);
    }
    else
    {
        flgrow=(n/a);
        flgrow++;
    }
    if(m%a==0)
    {
       flgcol=(m/a);
    }
    else
    {
        flgcol=(m/a);
        flgcol++;
    }
    printf("%lld",(flgrow*flgcol));
    return 0;
}

No comments:

Post a Comment