Topcoder SRM 509 DIV1 250

PROBLEM STATEMENT

In a nutshell, Given a number X, we need to find ( Supersum(X) ) % 9.

Supersum(x):

Supersum of x is sum of all subsets of the number x.

Eg: 123, the subsets are {1, 2, 3, 12, 13, 23,123}

Supersum(123) = 1+2+3+12+13+23+123 = 177 % 9 = 6

You can find a detailed problem description here.

Continue reading

Advertisements