Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
39032 | 木木老师 | 晚餐 | Python3 | Accepted | 37 MS | 3784 KB | 567 | 2022-09-25 13:59:10 |
import sys #import os #print(os.getcwd()) a="bowl" b="knife" c="fork" d="chopsticks" l=[] while True: line=sys.stdin.readline() if not line: break arr=[] for x in line.split(): arr.append(x) l.append(arr) for i in l: t=[] for j in range (len(i)): if j==0: continue if i[j]==a or i[j]==b or i[j]==c or i[j]==d: t.append(i[j]) for j in range (len(t)): print(t[j],end="") if j!=len(t)-1: print(" ",end="") print("")