Run ID:72570

提交时间:2024-05-11 11:02:11

def intercept_missiles(heights): if not heights: return 0 intercept_count = 1 max_height = heights[0] for height in heights[1:]: if height > max_height: intercept_count += 1 max_height = height return intercept_count def main(): heights = list(map(int, input().split())) cnt = intercept_missiles(heights) print(cnt) if __name__ == "__main__": main()