← 返回 meta 的题目列表Employees Count at Open Locations
类型:online_judge
Given a set of closed locations, return the total number of employees at each open office. Write a function def employees_at_open_offices(locations: List[Tuple[List[int], bool]]) -> List[int]: where locations is a list of tuples, each containing a list of integers representing the number of employees and a boolean indicating if the location is open. Output is a list of total employees for each open office, returned in the input order.
Example:
Input: [(([2, 3], True), ([1, 5], False), ([4], True))]
Output: [5, 4]
Example
Input
3
2 3
True
1 5
False
4
True