Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78394 彭士宝 18陶陶摘苹果 Python3 Accepted 34 MS 3776 KB 437 2024-06-19 20:43:37

Tests(10/10):


Code:

# 读取输入 apples_height = list(map(int, input().split())) taotao_max_height = int(input()) # 陶陶站在板凳上能够达到的最大高度 taotao_max_height_on_stool = taotao_max_height + 30 # 计算陶陶能够摘到的苹果数目 count = 0 for apple_height in apples_height: if apple_height <= taotao_max_height or apple_height <= taotao_max_height_on_stool: count += 1 # 输出结果 print(count)