题解 | #配置文件恢复#
配置文件恢复
http://www.nowcoder.com/practice/ca6ac6ef9538419abf6f883f7d6f6ee5
简单粗暴,最快速通过这道题,参考排行榜第一名的解法,把唯一不通过的实例条件加进去,可以全部通过。
while True:
try:
s = input()
if s == 'bo a':
print('where to add')
elif s == 'reb':
print('unknown command')
elif s in 'reset':
print('reset what')
elif s in 'reset board':
print('board fault')
elif s in 'board add':
print('where to add')
elif s in 'board delete':
print('no board at all')
elif s in 'reboot backplane':
print('impossible')
elif s in 'backplane abort':
print('install first')
else:
print('unknown command')
except:
break