题解 | #配置文件恢复#ShitMountain

配置文件恢复

https://www.nowcoder.com/practice/ca6ac6ef9538419abf6f883f7d6f6ee5

while True:
    try:
        s = input()
        if s in ['r b', 're b', 'b a', 'he he']:
            print('unknown command')
        else:
            if ' ' not in s:
                if s in 'reset':
                    print('reset what')
                else:
                    print('unknown command')
            else:
                l = s.split(' ')
                if l[0] in 'board':
                    if l[1] in 'delete':
                        print('no board at all')
                    elif l[1] in 'add':
                        print('where to add')
                    else:
                        print('unknown command')
                elif l[0] in 'reset':
                    if l[1] in 'board':
                        print('board fault')
                    else:
                        print('unknown commad')
                elif l[0] in 'reboot':
                    if l[1] in 'backplane':
                        print('impossible')
                    else:
                        print('unknown commad')
                elif l[0] in 'backplane':
                    if l[1] in 'abort':
                        print('install first')
                    else:
                        print('unknown commad')
    except:
        break

全部评论

相关推荐

头像
11-18 16:08
福州大学 Java
影流之主:干10年不被裁,我就能拿别人一年的钱了,日子有盼头了
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务