Sharing is Caring
CodeChefOpen on judge ↗
There are $N$ friends in a group. Each of them have $A_{i}$ candies. Can they share all of these candies among themselves such that each one of them have equal no. of candies. ###Input: - First line will contain $T$, number of testcases. Then the testcases follow. - First line of each testcase contains of a single line of input, an integer $N$ denoting no. of friends in the group. -
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