2 条题解

  • 0
    @ 2023-4-2 13:05:42
    num = input()
    numlist = list(num)
    if numlist[len(numlist)-2] == 'e' and numlist[len(numlist)-1] == 'r':
        numlist.pop(len(numlist)-2)
        numlist.pop(len(numlist)-1)
        print(''.join(numlist))
    if numlist[len(numlist)-2] == 'l' and numlist[len(numlist)-1] == 'y':
        numlist.pop(len(numlist)-2)
        numlist.pop(len(numlist)-1)
        print(''.join(numlist))
    if numlist[len(numlist)-3] == 'i' and numlist[len(numlist)-2] == 'n' and numlist[len(numlist)-1] == 'g':
        numlist.pop(len(numlist)-3)
        numlist.pop(len(numlist)-2)
        numlist.pop(len(numlist)-1)
        print(''.join(numlist))
    

    删除后缀【 2020年省赛 python】

    信息

    ID
    1623
    时间
    1000ms
    内存
    128MiB
    难度
    9
    标签
    递交数
    11
    已通过
    5
    上传者