题解 | #参数解析#
参数解析
http://www.nowcoder.com/practice/668603dc307e4ef4bb07bcd0615ea677
while True: try: a = input() b = [] mark = [] for i in range(len(a)): if a[i] == """: mark.append(i) if len(mark) == 0: b = a.split() else: j = 0 k = 0 if len(mark) % 2 != 0: mark = mark[:-1] while j < len(mark): m = mark[j] - k n = mark[j+1] - k b.extend(a[0:m].split()) b.append(a[m+1:n]) a = a[n+1:] k += n+1 j += 2 b.extend(a.split()) print(len(b)) print("\n".join(b)) except: break