I am trying to solve this problem but couldnt come up with anything …
we will name a number “aggregated number” if this number has the following attribute:
just like the Fibonacci numbers
1,1,2,3,5,8,13…..
the digits in the number can divided into several parts, and the later part is the sum of the former parts.
like 112358, because 1+1=2, 1+2=3, 2+3=5, 3+5=8
122436, because 12+24=36
1299111210, because 12+99=111, 99+111=210
112112224, because 112+112=224
Sorry for incomplete question we need to write to function to test whether a number is aggregated or not ?
any ideas please help
If you’re stuck, try to break the problem out into simpler solvable chunks. For example to get you started: