Sum Of Substrings
3. Given a positive integer. Find the sum of all of it's substrings. 4256 -> 4, 2, 5, 6, 42, 25, 56, 425, 256, 4256 Ans: 5077 Note that 45, 46 etc are not present as they are not substrings
3. Given a positive integer. Find the sum of all of it's substrings. 4256 -> 4, 2, 5, 6, 42, 25, 56, 425, 256, 4256 Ans: 5077 Note that 45, 46 etc are not present as they are not substrings
Comments