范围较小,模拟即可(数位dp还不会)😭
from math import sqrt,ceil,gcd,log;re=lambda:map(int,input().split()) a = [] res = 0 for i in range(0, 10001): res += str(i).count('7') a.append(res) t, = re() for _ in range(t): n, = re() print(a[n])
注册一个 南阳理工学院OJ 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 南阳理工学院OJ 通用账户