I'm trying to resolve an algorithm, basically is something like this: You have different components with a name and a value. For example:
Component-1 : 28 Component-2 : 351 Component-3 : 3457 Component-4 : 70552 Component-5 : 445903 Component-6 : 6346782 Component-7 : 53129236 Component-8 : 632423456 Component-9 : 5477934933
And you have this value:
And, I want to know if the component-1 is inside of this value.
For this case, you have to sum
component-1 + component-5 + component-8.
Assuming that the component has one more digit than the component that precedes it. Is possible determine if an specific value is inside of the total, if you have both resources?