首页 > 其他 > 详细

1A Theatre Square

时间:2015-09-25 07:01:44      阅读:229      评论:0      收藏:0      [点我收藏+]

题目大意;

有一个广场,广场的大小是n*m,  有a*a的石砖,石砖铺广场可以比广场大,石砖不能切割。问最少需要多少个石砖。
=====================================================================
#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <deque>
#include <cstring>
#include <cstdio>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <cstdlib>
using namespace std;
typedef long long LL;
const LL INF = 0xffffff;
const int maxn = 201315;
const LL MOD = 1e9+7;

int main()
{
    LL n, m, a, x, y;
    cin >> n >> m >> a;

    x = (n + a - 1)/a;
    y = (m + a - 1)/a;
    cout << x * y << endl;

    return 0;
}

 

1A Theatre Square

原文:http://www.cnblogs.com/chenchengxun/p/4836979.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!