public static BigInteger findLowestValAt1(BigInteger target) { for (BigInteger i = BigInteger.ONE; i.compareTo(target) < 0; i = i.add(BigInteger.ONE)) { if (Fib.contains(i, target)) { return i; } } return target; }
public static int findLowestValAt1(int target) { for (int i = 1; i < target; i++) { if (Fib.contains(i, target)) { return i; } } return target; }