static void Main(string[] args)
string[] weightMap = new string[] { "6", "7", "8", "9", "10", "J", "Q", "K", "A" };
string[] suitMap = new string[] { "D", "H", "C", "S" };
Console.WriteLine("Введите набор из 5 карт, например: 7:D 10:C A:S");
string flatInput = Console.ReadLine();
string[] listInput = flatInput.Split(' ');
if (listInput.Length != 5) {
Console.WriteLine("Никаких карт в рукаве!");
for (int i = 0; i < listInput.Length; i += 1)
string[] card = listInput[i].Split(':');
int weight = Array.IndexOf(weightMap, card[0]);
int suit = Array.IndexOf(suitMap, card[1]);
pack[i] = weight + 100 * suit;
bool isSingleSuit = true;
bool isSequentialPack = true;
int[] oneWeightCounts = new int[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 };
for (int i = 0; i < pack.Length - 1; i += 1)
if (pack[i] / 100 != pack[i + 1] / 100)
if (pack[i + 1] % 100 - pack[i] % 100 != 1)
isSequentialPack = false;
if (pack[i + 1] % 100 == pack[i] % 100)
oneWeightCounts[pack[i] % 100] += 1;
Console.WriteLine($"{isSequentialPack} {isSequentialPack} {oneWeightCounts}");
if (isSequentialPack == true && isSingleSuit == true)
Console.WriteLine("Вы царь стрит-флеша");
if (pack[pack.Length - 1] % 100 == 8)
Console.WriteLine("Более того, флеш-рояля");
} else if (Array.IndexOf(oneWeightCounts, 4) >= 0)
Console.WriteLine("Вы почти царь каре");
} else if (Array.IndexOf(oneWeightCounts, 3) >= 0 && Array.IndexOf(oneWeightCounts, 2) >= 0)
Console.WriteLine("Фулл-хаус, уже не лузер");
Console.WriteLine("Флеш!");
} else if (isSequentialPack)
Console.WriteLine("Стрит!");
} else if (Array.IndexOf(oneWeightCounts, 2) >= 0 && Array.IndexOf(oneWeightCounts, 2, Array.IndexOf(oneWeightCounts, 2) + 1) > 0)
Console.WriteLine("Две пары");
} else if (Array.IndexOf(oneWeightCounts, 2) >= 0)
Console.WriteLine("Садись, два");
Console.WriteLine("Провал!");