Блог пользователя Sanid

Автор Sanid, история, 3 месяца назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится