Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Array_Search_Workshop
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. List<int> array = new List<int>(Array.ConvertAll(Console.ReadLine().Split(','), int.Parse));
  15. List<string> result = new List<string>();
  16.  
  17. for (int i = 1; i <= array.Count; i++)
  18. {
  19. if (!array.Distinct().Contains(i))
  20. {
  21. result.Add(i.ToString());
  22. }
  23. }
  24. Console.WriteLine(string.Join(",",result));
  25.  
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement