Okabe and sum of numbers

0

0 votes
Easy
Problem

Okabe Rintaro, the mad scientist, is close to opening the Stein's;Gate but for that, he needs to solve the following problem:

He is given a very huge number and he needs to find the sum of all its subsets. A subset of this number is obtained by removing certain digits and arranging the remaining digits in the same order.

Since he is already exhausted from jumping through so many timelines, he needs your help!

enter image description here

INPUT:
A huge number, N.

CONSTRAINTS:
0<N<101000

OUTPUT:
Since the answer can be huge, print it modulo 109+7.

Sample Input
111
Sample Output
147
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

1+1+1+11+11+11+111=147

Contributers:
Editor Image

?