1A.md (965B)
1 Source: https://codeforces.com/problemset/problem/1/A 2 3 A. Theatre Square 4 5 time limit per test 6 7 1 second 8 9 memory limit per test 10 11 256 megabytes 12 13 input 14 15 stdin 16 17 output 18 19 stdout 20 21 Theatre Square in the capital city of Berland has a rectangular shape with the size *n* × *m* meters. On the occasion of the city's anniversary, a decision was taken to pave the Square with square granite flagstones. Each flagstone is of the size *a* × *a*. 22 23 What is the least number of flagstones needed to pave the Square? It's allowed to cover the surface larger than the Theatre Square, but the Square has to be covered. It's not allowed to break the flagstones. The sides of flagstones should be parallel to the sides of the Square. 24 25 Input 26 27 The input contains three positive integer numbers in the first line: *n*, *m* and *a* (1 ≤ *n*, *m*, *a* ≤ 109). 28 29 Output 30 31 Write the needed number of flagstones. 32 33 Examples 34 35 Input 36 37 ``` 38 6 6 4 39 ``` 40 41 Output 42 43 ``` 44 4 45 ```