2022.01.17翻译Theatre Square

题目 (https://acs.jxnu.edu.cn/problem/CF1A)描述:
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.

输入:
The input contains three positive integer numbers in the first line: n,  m and a (1 ≤  n, m, a ≤ 109).

输出:
Write the needed number of flagstones.

样例输入:
6 6 4
样例输出:
4

翻译:
在伯兰的首都有一个戏剧广场,它是一个n*m平方米大小的矩形。在这个城市的纪念日,人们
做了一个决定:给这个广场铺上正方形的花岗岩石板。每个石板的大小是a*a。

最少需要多少块石板才能铺满广场?石板铺的面积可以超过广场,但是整个广场必须被石板覆盖。
不能打破石板。石板的边要与广场的边平行。

输入:
输入共一行,包含三个正整数,n,m,a(1 ≤  n, m, a ≤ 109)。

输出:
写出需要的石板的数量。

样例输入:
6 6 4
样例输出:
4

上一篇:2022/1/17笔记


下一篇:印度欲自研系统以替代 iOS 和 Android;基于 OpenJDK 17 的龙芯平台 Java 环境发布;Python 即将支持 WebAssembly | 开源日报