public BigInteger Solve(BigInteger?input = null) { BigInteger result = 0; for (int i = 1; i < 1000000; i++) { if (!GeneralOperationsHelper.IsPallindrome(i)) { continue; } if (!GeneralOperationsHelper.IsPallindrome(Convert.ToString(i, 2))) { continue; } result += i; } return(result); }
public BigInteger Solve(BigInteger?input = null) { int factorial9 = GeneralOperationsHelper.Factorial(9); BigInteger result = 0; for (int i = 3; i < 7 * factorial9; i++) { int factorialSum = 0; var iString = i.ToString(); for (int j = 0; j < iString.Length; j++) { factorialSum += GeneralOperationsHelper.Factorial(int.Parse(iString[j].ToString())); } if (factorialSum == i) { result += i; } } return(result); }