We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Alice has 'a' candles. Each candle burns for one hour and then goes out. Alice, being a smart person, can make a new candle from 'b' went out candles. This new candle can be used like any other candle. Given 'a' and 'b', find the maximum number of hours Alice can light the candles. Assume that the value of ‘b’ is strictly greater than 1.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Candles Counting
You are viewing a single comment's thread. Return to all comments →
Alice has 'a' candles. Each candle burns for one hour and then goes out. Alice, being a smart person, can make a new candle from 'b' went out candles. This new candle can be used like any other candle. Given 'a' and 'b', find the maximum number of hours Alice can light the candles. Assume that the value of ‘b’ is strictly greater than 1.