title: Zeckendorfs Theorem Non Neighbouring Fibonacci Representation
signature: zeckendorfs_theorem_non_neighbouring_fibonacci_representation <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          54L, 
          34L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          71L, 
          55L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          64L, 
          55L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          71L, 
          55L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          96L, 
          89L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          43L, 
          34L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          70L, 
          55L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          94L, 
          89L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          95L, 
          89L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          69L, 
          55L
      )))
  
  }
  
  main()
source_py: def zeckendorfs_theorem_non_neighbouring_fibonacci_representation(n):
      if ((n == 0) or (n == 1)):
          return n
      (f1, f2, f3) = (0, 1, 1)
      while (f3 <= n):
          f1 = f2
          f2 = f3
          f3 = (f1 + f2)
      return f2
source_cpp: int zeckendorfs_theorem_non_neighbouring_fibonacci_representation(int n) {
    if ( n == 0 || n == 1 ) return n;
    int f1 = 0, f2 = 1, f3 = 1;
    while ( f3 <= n ) {
      f1 = f2;
      f2 = f3;
      f3 = f1 + f2;
    }
    return f2;
  }