1 条题解

  • 0
    @ 2024-4-13 23:32:06

    python:

    n = int(input())

    i = 0;ih = 0;i1 =0;i2 = 0;i3 = 0;i4 = 0;z = 0

    while i <= n:

    i1 = i//1000

    ih = i-(1000*(i//1000))

    i2 = ih//100

    ih = ih-(100*(ih//100))

    i3 = ih//10

    ih = ih-(10*(ih//10))

    i4 = ih//1

    if i%7 == 0 or i1 == 7 or i2 == 7 or i3 == 7 or i4 == 7:

    z+=i

    i+=1

    print(z)

    • 1

    信息

    ID
    1358
    时间
    1000ms
    内存
    256MiB
    难度
    10
    标签
    递交数
    1
    已通过
    0
    上传者