Computer Science, asked by ericzhouxd, 20 days ago

PROBLEM: Given a number less than 10^50 and length , find the sum of all the -digit numbers (starting on the left) that are formed such that, after the first -digit number is formed all others are formed by deleting the leading digit and taking the next -digits.

For example, given 1325678905 2, the 2-digit numbers formed are 13, 32, 25, 56, 67, 78, 89, 90, and 05. The sum is 455.

INPUT: There will 5 lines of input. Each will contain a positive integer less than 1050 and a positive integer n.

OUTPUT: For each line of input, print the sum of the n-digit numbers formed.

Answers

Answered by rudrakshsharma746
0

Answer:

input equals to output according to the question first digit of that is formed by number is positive integer is n so the answer will be 210

Explanation:

input output is greater than the output as the according to the question so why we will divide the input in according to the

Similar questions