TRUCKL - Truckloads
We have a pile of crates at our warehouse that we want to load onto trucks. Our plan is to divide the pile in half forming two smaller piles, then continuing dividing each of the small piles in half until we get piles that will fit on a truck. (Of course, when we divide an odd number of crates in "half", one of the resulting piles will have one more crate than the other.) Our problem is to determine how many trucks we will need to ship the crates.
Each case contain two integers , numCrates (the number of crates at the warehouse) and loadSize (the maximum number of crates that will fit in a truck), 0<numCrates<=2^31 , 0<loadSize<=2^31 ,Input will terminate by EOF .
For each case print one line contain an integer represent the number of trucks required.
1024 5 Output: