[LeetCode] Count the Number of Powerful Integers

1 · · Jan. 6, 2024, 3:37 p.m.
10034. Count the Number of Powerful Integers You are given three integers start, finish, and limit. You are also given a 0-indexed string s representing a positive integer. A positive integer x is called powerful if it ends with s (in other words, s is a suffix of x) and each digit in x is at most limit. Return the total number of powerful integers in the range [start..finish]. A string x is a suffix of a string y if and only if x is a substring of y that starts from some index (including 0) in...