Packing Biscuits
시간 제한1초메모리 제한1024 MB
맛도가 2^i인 비스킷 개수가 주어질 때, x개의 봉지가 모두 같은 총 맛도 y가 되도록 담을 수 있는 y의 개수를 구한다.
문제
Aunty Khong is organising a competition with participants, and wants to give each participant a bag of biscuits. There are different types of biscuits, numbered from to . Each biscuit of type () has a tastiness value of . Aunty Khong has (possibly zero) biscuits of type in her pantry.
Each of Aunty Khong's bags will contain zero or more biscuits of each type. The total number of biscuits of type in all the bags must not exceed . The sum of tastiness values of all biscuits in a bag is called the total tastiness of the bag.
Help Aunty Khong find out how many different values of exist, such that it is possible to pack bags of biscuits, each having total tastiness equal to .
제한
- (for all )
- For each call to
count_tastiness, the sum of tastiness values of all biscuits in the pantry does not exceed .
예제
이 문제는 공개된 예제가 없습니다.