Distribution of Candies
CodeChefOpen on judge ↗
Katya is throwing a party for $N$ of his friends. There is a candy store nearby and want to buy candies for them. Each candy has exactly k pieces. Remember each candy is a group of small pieces of chocolates All of his friends are happy if everyone gets equal number of pieces. katya gets sad if there are some pieces left. He should buy $P$ candies such that there is a way to distribute $K⋅P$ piec
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start