Advertisement
Guest User

Untitled

a guest
Aug 15th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4.  
  5. namespace ConsoleApp240
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. var dwarfDictionary = new Dictionary<string, Dictionary<string, int>>();
  12.  
  13. string input = String.Empty;
  14.  
  15. while ((input = Console.ReadLine()) != "Once upon a time")
  16. {
  17. var info = input.Split(new char[] { '<', ':', '>' }, StringSplitOptions.RemoveEmptyEntries);
  18.  
  19. var name = info[0];
  20. var color = info[1];
  21. var physics = info[2];
  22. if (!dwarfDictionary.ContainsKey(name))
  23. {
  24. var current = new Dictionary<string, Dictionary<string, int>>();
  25. current.Add(name)
  26. dwarfDictionary.Add(name, current);
  27. }
  28.  
  29.  
  30.  
  31. }
  32.  
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement