fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. const int Max = 1<<16;
  8. var count = new int[Max];
  9. for (int i = 0 ; i != Max ; i++) {
  10. count[(i * 7) & (Max-1)]++;
  11. }
  12. var notOne = 0;
  13. for (int i = 0 ; i != Max ; i++) {
  14. if (count[i] != 1) {
  15. notOne++;
  16. }
  17. }
  18. Console.WriteLine("Count of duplicate mappings found: {0}", notOne);
  19. }
  20. }
Success #stdin #stdout 0.02s 29656KB
stdin
Standard input is empty
stdout
Count of duplicate mappings found: 0