Please subscribe to the official Codeforces channel in Telegram via the link ×

Can anyone help with this?

Revision en1, by Sanid, 2024-05-28 20:31:12

Can anyone help with this? can you solve this coding problem. Bob is hosting a birthday party. He has called his friends and each friend will get a cake including bob so n cakes . there are m candles to be distributed among the cakes such that every cake has at least 1 candle and the difference in number of candles between any two neighbour is not greater than one . what can be the maximum number of candles bob can get. suppose bob is at kth(1-indexed) position . sample case n=6,m=28,k=5 then bob can get 6 candles at most


  Rev. Lang. By When Δ Comment
en2 English Sanid 2024-05-28 20:31:40 62
en1 English Sanid 2024-05-28 20:31:12 555 Initial revision (published)