我是靠谱客的博主 饱满外套,这篇文章主要介绍CodeForces 1 A.Theatre Square(水~),现在分享给大家,希望可以做个参考。

Description

aa 的砖铺满一个 nm 的地面问最少需要几块

Input

三个整数 n,m,a(1n,m,a109)

Output

输出最少需要几块砖

Sample Input

6 6 4

Sample Output

4

Solution

水题, ans=nama

Code

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<queue> #include<map> #include<set> #include<ctime> using namespace std; typedef long long ll; typedef pair<int,int>P; const int INF=0x3f3f3f3f,maxn=100001; int n,m,a; int main() { while(~scanf("%d%d%d",&n,&m,&a)) { int x=(n+a-1)/a,y=(m+a-1)/a; printf("%I64dn",(ll)x*y); } return 0; }

最后

以上就是饱满外套最近收集整理的关于CodeForces 1 A.Theatre Square(水~)的全部内容,更多相关CodeForces内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(57)

评论列表共有 0 条评论

立即
投稿
返回
顶部