题目描述

已知矩形的大小为n×m,现用a×a的正方形填充该矩形。输入三个正整数n,m,a(n,m,a≤10^9),计算至多能填入多少正方形?(正方形可以正好碰到矩形边界,但不能超出矩形外)

输入

一行三个用一个空格隔开的正整数n,m,a。

输出

输出能填入正方形的数量。

样例输入

3 4 1

样例输出

12

数据范围限制

1<=n,m,a≤10^9
 #include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
char b[];
int ans;
long long int a;
long long int n,m;
int now=;
int main()
{
cin>>n>>m>>a;
cout<<(n/a)*(m/a);
return ;
}

1004. 填充矩形 (Standard IO)的更多相关文章

  1. 1001. 温度转换 (Standard IO)

    1001. 温度转换 (Standard IO) 时间限制: 1000 ms  空间限制: 262144 KB  具体限制   题目描述 将输入的华氏温度转换为摄氏温度.由华氏温度F与摄氏温度C的转换 ...

  2. JZOJ 2137. 【GDKOI2004】城市统计 (Standard IO)

    2137. [GDKOI2004]城市统计 (Standard IO) Time Limits: 1000 ms  Memory Limits: 128000 KB  Detailed Limits  ...

  3. JZOJ 5326. LCA 的统计 (Standard IO)

    5326. LCA 的统计 (Standard IO) Time Limits: 1000 ms Memory Limits: 131072 KB Description Input Output S ...

  4. JZOJ 5307. 【NOIP2017提高A组模拟8.18】偷窃 (Standard IO)

    5307. [NOIP2017提高A组模拟8.18]偷窃 (Standard IO) Time Limits: 1000 ms Memory Limits: 262144 KB Description ...

  5. JZOJ 5286. 【NOIP2017提高A组模拟8.16】花花的森林 (Standard IO)

    5286. [NOIP2017提高A组模拟8.16]花花的森林 (Standard IO) Time Limits: 1000 ms Memory Limits: 131072 KB Descript ...

  6. JZOJ 5305. 【NOIP2017提高A组模拟8.18】C (Standard IO)

    5305. [NOIP2017提高A组模拟8.18]C (Standard IO) Time Limits: 1000 ms Memory Limits: 131072 KB Description ...

  7. JZOJ 5257. 小X的佛光 (Standard IO)

    5257. 小X的佛光 (Standard IO) Time Limits: 2000 ms Memory Limits: 524288 KB Description Input Output Sam ...

  8. JZOJ 5258. 友好数对 (Standard IO)

    5258. 友好数对 (Standard IO) Time Limits: 1000 ms Memory Limits: 524288 KB Detailed Limits Description I ...

  9. JZOJ 1349. 最大公约数 (Standard IO)

    1349. 最大公约数 (Standard IO) Time Limits: 1000 ms Memory Limits: 65536 KB Description 小菜的妹妹小诗就要读小学了!正所谓 ...

随机推荐

  1. KEY

    typedef struct st_key { uint key_length; /* Tot length of key */ ulong flags; /* dupp key and pack f ...

  2. P4304 [TJOI2013]攻击装置 最小割

    $ \color{#0066ff}{ 题目描述 }$ 给定一个01矩阵,其中你可以在0的位置放置攻击装置. 每一个攻击装置(x,y)都可以按照"日"字攻击其周围的8个位置(x-1, ...

  3. 数学 CF1068B LCM

    CF1068B LCM 给定一个正整数\(b (1\leq b \leq 10^{10})\). 把一个正整数a从1枚举到\(10^{18}\),求有多少种不同的\(\large \frac{[a,b ...

  4. Android 开发者文档 -- 应用基础知识

    https://developer.android.com/guide/components/fundamentals 应用基础知识 Android 应用采用 Java 编程语言编写.Android ...

  5. tomcat正常启动后http://localhost:8080/报错404

    病症: tomcat在eclipse里面能正常启动,而在浏览器中访问http://localhost:8080/不能访问,且报404错误.同时其他项目页面也不能访问.关闭eclipse里面的tomca ...

  6. BellmanFord贝尔曼-福特算法

    import java.util.ArrayList; import java.util.Scanner; /** * 贝尔曼-福特算法 * * Bellman - ford算法是求含负权图的单源最短 ...

  7. 2.6 Go 读取CSV

    Go读取CSV文件,其内容被转换成字符串数组 package main import ( "encoding/csv" "fmt" "io/iouti ...

  8. 实验Complex

    #include<iostream> #include<cmath> using namespace std; class Complex { public: Complex ...

  9. Longest palindrome subsequence

    A palindrome is a nonempty string over some alphabet that reads the same forwardand backward. Exampl ...

  10. MySQL更改字段名

    更改字段名 alter table tb_name change col_name new_col_name create_definition;