3 条题解

  • 0
    @ 2025-8-21 14:06:29

    范围较小,模拟即可(数位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])
    

    信息

    ID
    221
    时间
    1000ms
    内存
    256MiB
    难度
    8
    标签
    递交数
    729
    已通过
    138
    上传者