问题4384--Theatre Square

4384: Theatre Square

时间限制: 1 Sec  内存限制: 512 MB
提交: 0  解决: 0
[提交] [状态] [讨论版] [命题人:]

题目描述

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. 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. 首都伯兰市的剧院广场呈矩形,大小为n×m米。在城市周年纪念之际,决定用方形花岗岩石板铺砌广场。每个石板的大小为a×a。 铺设广场所需的最少石板数量是多少?允许覆盖比剧院广场大的表面,但必须覆盖广场。不允许破坏石板。石板的侧面应与正方形的侧面平行。

输入

The input contains three positive integer numbers in the first line: n,m and a (1≤n,m,a≤10^9). 输入在第一行中包含三个正整数:n,m和a(1≤n,m,a≤10^ 9)。

输出

Write the needed number of flagstones. 写出所需数量的石板。

样例输入

6 6 4

样例输出

4

来源/分类

 

[提交] [状态]