Advertisement
i_jaguar

Untitled

Jun 18th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Numerics;
  4. using System.Collections.Generic;
  5. using System.Text;
  6.  
  7. namespace _02._Memory_View
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string input = Console.ReadLine();
  14.  
  15. List<int> word = new List<int>();
  16.  
  17. StringBuilder sb = new StringBuilder();
  18. string str = "";
  19. string result = "";
  20.  
  21. while (input != "Visual Studio crash")
  22. {
  23. str += input;
  24. input = Console.ReadLine();
  25. }
  26.  
  27. List<int> nums = str
  28. .Split(" ", StringSplitOptions.RemoveEmptyEntries)
  29. .Select(int.Parse)
  30. .ToList();
  31.  
  32. for (int i = 0; i < nums.Count; i++)
  33. {
  34. if (nums[i] == 32656 && nums[i + 1] == 19759 && nums[i + 2] == 32763)
  35. {
  36. int curr = nums[i + 4];
  37.  
  38. for (int j = i + 6; j < i + 6 + curr; j++)
  39. {
  40. char a = (char)nums[j];
  41.  
  42. sb.Append(a);
  43. result = sb.ToString();
  44. }
  45.  
  46. Console.WriteLine(string.Join("", result));
  47. sb = new StringBuilder();
  48. }
  49. }
  50.  
  51.  
  52.  
  53. }
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement