楼主:
sixB (6B)
2025-04-11 22:17:532999.
露西亚:帮写HARD阿阿阿阿阿阿阿
好好好
其实我觉得这题
应该也没到hard
就数数字
你版版主最会了
各种 case一直差1 被弄的很躁==
不过本质都差不多
先找final范围里的个数
再找start范围里的
两个相减
// 1 <= start <= finish <= 1e15
// 1 <= limit <= 9
// 1 <= s.length <= floor(log10(finish)) + 1
// s only consists of numeric digits which are at most limit.
// s does not have leading zeros.
using ll = long long;
class Solution {
public:
ll numberOfPowerfulInt(ll start, ll finish, int limit, string s) {
ll val = stoll(s);
ll t =