Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace test
- {
- class Program
- {
- static void Main(string[] args)
- {
- Dictionary<string, List<string>> result =
- new Dictionary<string, List<string>>();
- string name = Console.ReadLine();
- string city = Console.ReadLine();
- // add name as a key and city as a value to result
- result.Add(name,new List<string>());
- result[name].Add(city);
- foreach (var list in result)
- {
- foreach (var str in list.Value)
- {
- Console.WriteLine(str);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement