L1-076 降价提醒机器人 python
python 实现
s=input() num=int(s.split(" ")[0]) dream_price=int(s.split(" ")[1]) lst=[] for i in range(num): real_price=float(input()) if real_price<dream_price: lst.append(real_price) for i in lst: print("On Sale! {:.1f}".format(i))