title: Leonardo Number 1
signature: function leonardo_number_1(n)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(n, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(75, 6832909245813413);
      @printf("TEST-0...%s\n",result);
      
      result = driver(76, 11055879401769513);
      @printf("TEST-1...%s\n",result);
      
      result = driver(55, 451702867433);
      @printf("TEST-2...%s\n",result);
      
      result = driver(14, 1219);
      @printf("TEST-3...%s\n",result);
      
      result = driver(43, 1402817465);
      @printf("TEST-4...%s\n",result);
      
      result = driver(10, 177);
      @printf("TEST-5...%s\n",result);
      
      result = driver(16, 3193);
      @printf("TEST-6...%s\n",result);
      
      result = driver(30, 2692537);
      @printf("TEST-7...%s\n",result);
      
      result = driver(44, 2269806339);
      @printf("TEST-8...%s\n",result);
      
      result = driver(65, 55555780070575);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
source_py: def leonardo_number_1(n):
      dp = []
      dp.append(1)
      dp.append(1)
      for i in range(2, (n + 1)):
          dp.append(((dp[(i - 1)] + dp[(i - 2)]) + 1))
      return dp[n]
source_cpp: int leonardo_number_1(int n) {
    int dp [ n + 1 ];
    dp [ 0 ] = dp [ 1 ] = 1;
    for ( int i = 2;
    i <= n;
    i ++ ) dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ] + 1;
    return dp [ n ];
  }