Batman and bags of Money
CodeChefOpen on judge ↗
The Penguin robbed the Gotham City Bank but Batman being so awesome caught him the very same day. But now Penguin divided all the money in different bags, where ith bag contains an amount Ai. Now batman wants to know if Penguin hid some bags before he was caught or if all the money has been recovered. Since batman already knows the total amount stolen, your job is to find out the sum of amount pre
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