{:5_110:}
{:10_265:}
哦哦,看下
重在参与
谢谢
我现在写代码还很初级,现目前这能这样
yz = 30
sg = int(input('请输入小明的身高:'))
pg = input('请输入每个苹果的高度,用空格隔开:').split(' ')
l = []
b = []
yd = []
for i in pg:
if int(i) <= sg + yz:
l.append(i)
if int(i) <= sg:
yd.append(i)
else:
b.append(i)
print('能摘苹果个数为:{}'.format(len(l)))
print('能摘苹果的高度为:{}'.format(l))
print('不能摘苹果个数为:{}'.format(len(b)))
print('移动几次椅子:{}'.format(len(l) - len(yd)))
元豪 发表于 2022-10-11 18:47
我真服了!!
呵呵
{:9_228:}
{:7_131:}
1
1
ww63734671 发表于 2022-10-20 22:41
1
不要水帖
china2022 发表于 2022-10-20 23:17
1
还要水帖啊{:10_277:}
{:5_90:}
{:5_90:}
{:5_90:}
{:5_90:}
我没有看明白题目~~~{:10_266:}
999我 发表于 2022-10-21 09:04
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ...
????
;