number and width. Write number in decimal and look at every contiguous piece of that notation that is exactly width digits long.
Each piece is read as a number; leading zeros are fine ("07" means 7). Count how many pieces divide number evenly. A piece equal to zero never counts as a divisor.
Equal pieces at different positions are counted separately.number=1236, width=2 → 1
The windows are 12, 23 and 36. 1236 is divisible by 12 (103 · 12) but not by 23 or 36, so the answer is 1.
number=5005, width=2 → 1
The windows are 50, 00 and 05. 5005 is not divisible by 50, 00 is zero and is never a divisor, while 05 = 5 divides 5005. The answer is 1.
number=777, width=1 → 3
numbernumber=1236, width=2
1
Run checks the first 3 tests in your browser. Submit checks all 81 tests on the server, hidden ones included.