CF965A.Paper Airplanes
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
To make a paper airplane, one has to use a rectangular piece of paper. From a sheet of standard size you can make s airplanes.
A group of k people decided to make n airplanes each. They are going to buy several packs of paper, each of them containing p sheets, and then distribute the sheets between the people. Each person should have enough sheets to make n airplanes. How many packs should they buy?
要制作一架纸飞机,需要使用一张矩形纸。从一张标准尺寸的纸中,可以制作 s 架纸飞机。
有 k 个人组成一个小组,每人要制作 n 架纸飞机。他们将购买若干包纸,每包含有 p 张纸,然后将纸分发给每个人。每个人应拥有足够制作 n 架纸飞机的纸张数量。他们应该购买多少包纸?
输入格式
The only line contains four integers k, n, s, p (1≤k,n,s,p≤104) — the number of people, the number of airplanes each should make, the number of airplanes that can be made using one sheet and the number of sheets in one pack, respectively.
唯一的一行包含四个整数 k、n、s、p(1≤k,n,s,p≤104),分别表示人数、每人应制作的飞机数量、一张纸可制作的飞机数量以及一包纸所含的纸张数量。
输出格式
Print a single integer — the minimum number of packs they should buy.
输出一个整数——他们应购买的最小包数。
输入输出样例
输入#1
5 3 2 3
输出#1
4
输入#2
5 3 100 1
输出#2
5
说明/提示
In the first sample they have to buy 4 packs of paper: there will be 12 sheets in total, and giving 2 sheets to each person is enough to suit everyone's needs.
In the second sample they have to buy a pack for each person as they can't share sheets.
在第一个样例中,他们需要购买 4 包纸:总共将有 12 张纸,给每人 2 张即可满足所有人的需求。
在第二个样例中,由于不能共享纸张,他们需要为每人购买一包纸。
输入解题思路,AI测评打分。不知道怎么写?