1A

Program

#include <bits/stdc++.h>
 
using namespace std;
 
int main()
{
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    double n,m,a;
    cin >> n >> m >> a;
    cout << fixed << setprecision(0) << ceil(n/a) * ceil(m/a) << '\n';
    return 0;
}
import math
n,m,a = map(int, input().split())
print(math.ceil(n/a) * math.ceil(m/a))
#include <bits/stdc++.h>
 
using namespace std;
 
int main() {
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    long long n, m, a;
    std::cin >> n >> m >> a;
    std::cout << ((n + a - 1) / a) * ((m + a - 1) / a) << std::endl;
    return 0;
}

Comments