diff --git a/src/ProjectEuler/Maths.cs b/src/ProjectEuler/Maths.cs index 1ea4b293..a72ac75d 100644 --- a/src/ProjectEuler/Maths.cs +++ b/src/ProjectEuler/Maths.cs @@ -238,9 +238,9 @@ internal static bool IsAbundantNumber(long value) internal static bool IsPandigital(long value, bool allowZero = false) { IReadOnlyList digits = Digits(value); - IReadOnlyList distinctDigits = digits.Distinct().ToArray(); + int[] distinctDigits = digits.Distinct().ToArray(); - if (digits.Count != distinctDigits.Count) + if (digits.Count != distinctDigits.Length) { return false; }