input:
5
0412578440
0412199803
0468892011
112
15
Output:
28
Why is there not answer 27?
0412578440 10
0412199803 6
0468892011 8
112 2
15 1
27 elements
input:
5
0412578440
0412199803
0468892011
112
15
Output:
28
Why is there not answer 27?
0412578440 10
0412199803 6
0468892011 8
112 2
15 1
27 elements
“112” => 3 instead of 2.
There’s a chart in the statement which shows exactly how the numbers are stored in this case.