L1-041 寻找250 python

python 实现

sr=str(input())
count=1

for i in sr:
    if i==' ':
        count+=1
for i in range(count):
    temp=int(sr.split(' ')[i])
    if temp==250:
        print("{}".format(i+1))
        break

 

posted @ 2024-06-28 16:25  豆豆是只乖狗狗  阅读(21)  评论(0)    收藏  举报