public override void Puzzle1() { long value = 1; int iCard = 0; while (value != cardPublicKey) { iCard++; value = HelperClass.CalcSubjectNumber(value, subjectNumber, 20201227); } Console.WriteLine(iCard); value = 1; int iDoor = 0; while (value != doorPublicKey) { iDoor++; value = HelperClass.CalcSubjectNumber(value, subjectNumber, 20201227); } Console.WriteLine(iDoor); value = 1; for (int i = 0; i < iCard; i++) { value = HelperClass.CalcSubjectNumber(value, doorPublicKey, 20201227);; } Console.WriteLine(value); }