You are given three positive integers start, finish, and limit. You are also given a string s representing a positive integer.
An integer is defined as powerful if it satisfies both of the following conditions:
Every digit of the integer is at most limit.
The integer ends with the suffix s.
Return the number of powerful integers in the inclusive range start, finish
Constraints:
start finish
limit
s.length finish
s consists only of numeric digits that are at most limit.
s does not contain leading zeros.
You are given three positive integers start, finish, and limit. You are also given a string s representing a positive integer.
An integer is defined as powerful if it satisfies both of the following conditions:
Every digit of the integer is at most limit.
The integer ends with the suffix s.
Return the number of powerful integers in the inclusive range start, finish
Constraints:
start finish
limit
s.length finish
s consists only of numeric digits that are at most limit.
s does not contain leading zeros.