Packing Biscuits
시간 제한: 1000ms메모리 제한: 1024MB출처: IOI 2020BOJ 19936
문제
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 .
코드를 제출하려면 로그인하세요.