title: Nth Non Fibonacci Number
signature: function nthNonFibonacciNumber(n: number): number {
source_py: def nth_non_fibonacci_number(n):
      prevPrev = 1
      prev = 2
      curr = 3
      while (n > 0):
          prevPrev = prev
          prev = curr
          curr = (prevPrev + prev)
          n = (n - ((curr - prev) - 1))
      n = (n + ((curr - prev) - 1))
      return (prev + n)
source_cpp: int nth_non_fibonacci_number(int n) {
    int prevPrev = 1, prev = 2, curr = 3;
    while ( n > 0 ) {
      prevPrev = prev;
      prev = curr;
      curr = prevPrev + prev;
      n = n - ( curr - prev - 1 );
    }
    n = n + ( curr - prev - 1 );
    return prev + n;
  }
question_info.test_list: [{"idx": 0, "outputs": 85, "inputs": {"n": 76}}, {"idx": 1, "outputs": 101, "inputs": {"n": 91}}, {"idx": 2, "outputs": 71, "inputs": {"n": 62}}, {"idx": 3, "outputs": 74, "inputs": {"n": 65}}, {"idx": 4, "outputs": 93, "inputs": {"n": 83}}, {"idx": 5, "outputs": 66, "inputs": {"n": 57}}, {"idx": 6, "outputs": 85, "inputs": {"n": 76}}, {"idx": 7, "outputs": 11, "inputs": {"n": 6}}, {"idx": 8, "outputs": 6, "inputs": {"n": 2}}, {"idx": 9, "outputs": 96, "inputs": {"n": 86}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(n: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(76, 85);
    console.log(`TEST-0...${result}`);
  
    result = driver(91, 101);
    console.log(`TEST-1...${result}`);
  
    result = driver(62, 71);
    console.log(`TEST-2...${result}`);
  
    result = driver(65, 74);
    console.log(`TEST-3...${result}`);
  
    result = driver(83, 93);
    console.log(`TEST-4...${result}`);
  
    result = driver(57, 66);
    console.log(`TEST-5...${result}`);
  
    result = driver(76, 85);
    console.log(`TEST-6...${result}`);
  
    result = driver(6, 11);
    console.log(`TEST-7...${result}`);
  
    result = driver(2, 6);
    console.log(`TEST-8...${result}`);
  
    result = driver(86, 96);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: nthNonFibonacciNumber
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js