1(A,cpp): solve “Theatre Square”

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2023-07-09 22:46:36 +02:00
parent 3ad2018645
commit 296c65afe6
Signed by: mfocko
GPG key ID: 7C47D46246790496

21
1/a.cpp Normal file
View file

@ -0,0 +1,21 @@
#include <cstdint>
#include <iostream>
namespace {
void solve() {
int64_t n, m, a;
std::cin >> n >> m >> a;
int64_t n_needed = n / a + (n % a > 0);
int64_t m_needed = m / a + (m % a > 0);
std::cout << (n_needed * m_needed) << "\n";
}
} // namespace
int main(void) {
solve();
return 0;
}