1 条题解

  • 0
    @ 2024-6-1 18:53:08
    a = input().split(' ')
    for i in range(len(a)):
        a[i] = int(a[i])
    before = []
    temp = []
    now = []
    number_before = [6,9,0,1,8]
    number_after = [9,6,0,1,8]
    num = 0
    for i in range(1,a[0] + 1):
        for j in range(1,a[1] + 1):
            if i <= 9:
                before.append(i)
            else:
                before.append(i // 10)
                before.append(i % 10)
            if j <= 9:
                before.append(0)
                before.append(j)
            elif j <= 99:
                before.append(j // 10)
                before.append(j % 10)
            else:
                before.append(1)
                before.append(0)
                before.append(0)
            temp = before
            for n in range(len(before)):
                if temp[n] in number_before:
                    for x in range(len(number_before)):
                        if number_before[x] == temp[n]:
                            now.insert(0,number_after[x])
                else:
                    now.insert(0,-1)
            if now == before:
                num += 1
            before = []
            temp = []
            now = []
    print(num)
    
    • 1

    信息

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