# Codeforces 476 DIV 2 A problem

i am unable to get the test cases,
k=number of people
n=the number of airplanes each should make,
s=the number of airplanes that can be made using one sheet,
p= the number of sheets in one pack,

so, we are given k =5, n= 3, s=2, p=3
so, 1 pack has 3 sheets, and one sheet can make 2 airplanes, so, 1 pack can make 6 airplanes, and we have 5 people and each has to make 3 airplanes, so total airplanes=15.
so, won;t it be 15/6=2.5=~3? we need 3 packs!! why 4?
can anyone please explain this.

Every person should make n papers. To make n papers every person need at least ceil(n/s) papers (in you example ceil(3/2) or 2 papers each).
So total paper required is number of people times number of paper needed for each. So k * ceil(n/s).
Then we need to calculate how many packs to buy for that much paper.
That will be ceil((k * ceil(n/s)) / p)
So the answer is,
ceil( ( k * ceil( n / s ) ) / p )
= ceil( ( 5 * ceil( 3 / 2 ) ) / 3 )
= 4

but i think, what i explained also looks good. i have taken first how many airplanes do we need to make, but you and tutorial start with the number of pages needed.
so, what is the problem in my explanation?

1 sheet can make 2 airplanes. But each person needs to make 3 airplanes. So, each person will need 2 sheets. There are 5 persons. So, 10 sheets are needed. 1 pack has 3 sheets. So, total 4 packs are needed.

You can not directly say 1 pack can make 6 airplanes because there are many people.

okok got it. Thanks