From 500bae4ec11778259f6a96155bf93cf347c329b0 Mon Sep 17 00:00:00 2001 From: ShazidMahsrafi Date: Wed, 7 Jun 2023 20:14:37 +0600 Subject: [PATCH] initial commit --- 1A-Theater Square/1A.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 1A-Theater Square/1A.cpp diff --git a/1A-Theater Square/1A.cpp b/1A-Theater Square/1A.cpp new file mode 100644 index 0000000..b290889 --- /dev/null +++ b/1A-Theater Square/1A.cpp @@ -0,0 +1,22 @@ +#include +using namespace std; +int main() +{ + long long n, m, a, div, len, wid; + cin >> n >> m >> a; + div = n / a; + if (n % a == 0) + len = div * a; + else + len = (div + 1) * a; + + div = m / a; + if (m % a == 0) + wid = div * a; + else + wid = (div + 1) * a; + + div = (len * wid) / (a * a); + + cout << div; +} \ No newline at end of file