You are on page 1of 4

10/22/2018 Hacker Blocks

Hello, (
(/users/16283)
Rohit
Problem
Solve this problem and get ranked among your peers
MAIN NAVIGATION

 Home
 Time Left:
 Daily Code Byte 1 Hours 20 Mins and 10 Seconds

 Contests

 Competitions

 Practice
Description (/contests/c/560/1883)
(https://codingblocks.com/cours

Submissions (/contests/c/560/1883/submissions)

(https://online.codingblocks.com Editorial (/contests/c/560/1883/editorial)



RISHABH ,RIYA AND LOBSTER FRITTATA
 Help
Rishabh and Riya are deeply in love with each other. It’s
their anniversary soon and Rishabh is planning to propose
© Copyright 2018 - Coding Blocks Pvt.
Ltd. her. Though he earns well but he has not enough money
to propose her in their dream location Fiji.Therefore to
T(https://codingblocks.com/tos.html) earn some more money he decides to join outlets where
o
S
he has to pack Lobster Frittatas in an efficient manner.

He has 'd' Lobster Frittata and lots of boxes. The boxes are
(https://codingblocks.com/privacypo
not like the normal ones i.e if you put m bars inside it it
gets divided into m + 1 sections. Rishabh will be paid more
if he acts minimalist. But the firm is strictly against dividing
some box into more than 'i' sections as well putting more
than 's' Lobster Frittata into some section of the box. What
is the minimum number of boxes Rishabh will have to use
if he has to put all the Lobster Frittata in boxes, and he has
' b' divisors?

Note: Rishabh needs to minimise the number of used


boxes, not sections.

Input Format:
The first line contains four space-separated integers i, d, b,
s the maximum number of sections in the box, the number
of nuts, the number of divisors and the capacity of each
section of the box.
https://hack.codingblocks.com/contests/c/560/1883 1/4
10/22/2018 Hacker Blocks

Constraints:

2<=m<=1000
1<=d ,b ,s<=1000

Hello, (
(/users/16283) Output Format:
Rohit
Print a single integer which is the answer

MAIN NAVIGATION Sample Input:

3 10 3 3
 Home

Sample Output:
 Daily Code Byte
2

 Contests
Time Limit: 1 sec

 Competitions

 Practice    
100 11 100/100 8
(https://codingblocks.com/cours

(https://online.codingblocks.com

 Help

© Copyright 2018 - Coding Blocks Pvt.


Ltd.

T(https://codingblocks.com/tos.html)
o
S

(https://codingblocks.com/privacypo

https://hack.codingblocks.com/contests/c/560/1883 2/4
10/22/2018 Hacker Blocks

CODE Theme: Language:


NOW Monokai C++
Hello, (
(/users/16283)
Rohit
1 #include<iostream>
2 int main() {
MAIN NAVIGATION 3 return 0;
4 }

 Home

 Daily Code Byte

 Contests

 Competitions

 Practice

(https://codingblocks.com/cours

(https://online.codingblocks.com

 Help
RESET RUN SUBMIT

© Copyright 2018 - Coding Blocks Pvt.


Ltd.
 Provide custom input
T(https://codingblocks.com/tos.html)
o
S

(https://codingblocks.com/privacypo

https://hack.codingblocks.com/contests/c/560/1883 3/4
10/22/2018 Hacker Blocks

BEST SUBMISSION
Hello, (
(/users/16283)
Rohit

Rank User Score Language


MAIN NAVIGATION
1 Harsh Bhardwaj 100 C++
 Home (/users/3210)

 Daily Code Byte 2 Chakshur Tyagi 100 Python


(/users/16288)
 Contests
3 Sachin Singla 100 C++
 Competitions (/users/10911)

 Practice 4 DHRUV GUPTA 100 C++


(/users/7745)
(https://codingblocks.com/cours

5 Sirjanpreet Singh Banga 100 Python
(/users/4456)
(https://online.codingblocks.com

6 Anshul Kumar singh 100 C++
(/users/16250)
 Help
7 lakshay nasa 37 C++
(/users/16213)
© Copyright 2018 - Coding Blocks Pvt.
Ltd.
8 Abhishek sharma 37 C++
T(https://codingblocks.com/tos.html) (/users/16265)
o
S

(https://codingblocks.com/privacypo

https://hack.codingblocks.com/contests/c/560/1883 4/4

You might also like