17160 6.34% 4 card
123552 45.64% 3 card
112476 41.55% 2 card
17537 6.48% 1 card
270725 100.00%
Rank count + suit count
8 7 6 5 4 3 2 t t
17160 113256 112632 27209 468 0 0 270725 270725
public static int Bengasi()
{
int counter = 0;
int[] split = new int[9];
HashSet<int> rank = new HashSet<int>();
HashSet<int> suit = new HashSet<int>();
int rankPlusSuit;
for (int i = 51; i >=3;>= 3; i--)
{
for (int j = i - 1; j >= 2; j--)
{
for (int k = j - 1; k >= 1; k--)
{
for (int m = k - 1; m >= 0; m--)
{
rank.Clear();
rank.Add(i % 13);
rank.Add(j % 13);
rank.Add(k % 13);
rank.Add(m % 13);
suit.Clear();
suit.Add(i / 13);
suit.Add(j / 13);
suit.Add(k / 13);
suit.Add(m / 13);
rankPlusSuit = rank.Count + suit.Count;
split[rankPlusSuit]++;
counter++;
}
}
}
}
Debug.WriteLine($"{split[8]} {split[7]} {split[6]} {split[5]} {split[4]} {split[3]} {split[8] + split[7] + split[6] + split[5] + split[4] + split[3]} {counter}");
return counter;
}