[Community Puzzle] Number of Digits - Puzzle discussion

i used this case to debug my code when i got lost:
input
7847967
7
output
5567323

for me it was hard when k was a digit in the n number

Hi,
my code is OK on all IDE tests but fails on Validator 9.
Can I have an hint on what this validator consists in and if my code times-out or gives a bad answer ?
Thanks by advance.

The input for Validator 9 is also a 9-digit number, but it’s smaller than the one for Test 9. k is also 1.

Many thanks, There was a tricky error of +/- 1.
It’s now OK