← 返回 meta 的题目列表Random City Generator
类型:online_judge
Given a dictionary where keys are cities and values are their population, write a random generator function that returns a city name based on the population distribution.
Example
Input
{'CityA': 5000000, 'CityB': 3000000, 'CityC': 2000000}