Theatre Square
Practice this coding question on Coding Gurukul.
Problem statement
A rectangular courtyard of size n by m must be fully covered with square tiles of side a. Tiles stay aligned with the courtyard sides and cannot be cut. They may extend beyond the boundary. Find the minimum number required.
Input format
Three integers n m a.
Output format
Print the minimum tile count.
Constraints
1 <= n,m,a <= 1000000000; use 64-bit integers.
Sample input
7 9 4
Sample output
6
Sign in to run or submit a solution in C++, Java or Python.