using System.Collections;
using System.Collections.Generic;
public static void Main()
for (int i = 0; i <= 50; i++)
DipCheck(i, maxThreshold, sampleRate);
private static void DipCheck(int requestCount, int maxThreshold, int sampleRate)
var min = (requestCount - 1) / maxThreshold * maxThreshold + 1;
var max = min + (maxThreshold - 1);
var range = Enumerable.Range(min, max - min + 1);
var random = new Random(min);
for (int i = 0; i < sampleRate; i++)
var picked = range.ElementAt(random.Next(range.Count()));
match = match || requestCount == picked;
Console.WriteLine(match == true ? "Yes - " + requestCount : "No - " + requestCount);