Divide and add
CodeChefOpen on judge ↗
Scott and Tiger play a game. Initially Scott gives one group of *n* numbers to the Tiger, then they start to complete the following tasks: - Each time Tiger gets a group of numbers, he sums up all the numbers and adds this sum to the score. Then he gives the group to the Scott. - Each time Scott gets a group consisting of a single number, he throws this group out. Each time Tiger gets a group con
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