fork(1) 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. int N = 100;
  10.  
  11. List<int> myList = Enumerable.Range(0, N).ToList();
  12.  
  13. double K = 53;
  14.  
  15. List<int> solutions=new List<int>();
  16. for (int i=1;i<=K;i++)
  17. {
  18. solutions.Add(myList[(int)Math.Round(i*(N/K)-1)]);
  19. }
  20.  
  21. Console.WriteLine(solutions.Count);
  22. Console.WriteLine(string.Join(", ", solutions));
  23. }
  24. }
Success #stdin #stdout 0s 131776KB
stdin
Standard input is empty
stdout
53
1, 3, 5, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 25, 27, 29, 31, 33, 35, 37, 39, 41, 42, 44, 46, 48, 50, 52, 54, 56, 57, 59, 61, 63, 65, 67, 69, 71, 73, 74, 76, 78, 80, 82, 84, 86, 88, 90, 91, 93, 95, 97, 99