fork(5) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. string raw = @"1.Jeffrey
  10. 2.Darkthread
  11. 3.球證
  12. 4.旁證
  13. 5.主辦
  14. 6.協辦
  15. 7.全都是我的人";
  16. List<string> candidates = new List<string>(raw.Split('\n'));
  17. Random rnd = new Random(975047);
  18. Console.Write(
  19. string.Join("\n",
  20. candidates.OrderBy(o => rnd.Next()).Take(3).ToArray()));
  21. }
  22. }
Success #stdin #stdout 0.02s 131648KB
stdin
Standard input is empty
stdout
5.主辦
7.全都是我的人
4.旁證