← 返回 scale.ai 的题目列表Party Times in Towns
类型:online_judge
Given the name of a town, party IDs, and their details including start and end times in string format like 2am, 10pm. Write a function to output all the start and end times of parties in the town. For example, Town A has two parties with times 1pm-3pm and 8pm-10pm, the output should be {A: [13-22]}. Note that you need to convert AM/PM time to integer in 24-hour format. Assume each partyID is unique.
Example
Input
A
{'A': [101, 102]}
[{'id': 101, 'start': '1pm', 'end': '3pm'}, {'id': 102, 'start': '8pm', 'end': '10pm'}]