title: Padovan Sequence
signature: padovan_sequence <- 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(
          1L, 
          1L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          92L, 
          124155792775L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          29L, 
          2513L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          52L, 
          1618192L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          55L, 
          3761840L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          13L, 
          28L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          83L, 
          9882257736L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          83L, 
          9882257736L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          10L, 
          12L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          67L, 
          109870576L
      )))
  
  }
  
  main()
source_py: def padovan_sequence(n):
      (pPrevPrev, pPrev, pCurr, pNext) = (1, 1, 1, 1)
      for i in range(3, (n + 1)):
          pNext = (pPrevPrev + pPrev)
          pPrevPrev = pPrev
          pPrev = pCurr
          pCurr = pNext
      return pNext
source_cpp: int padovan_sequence(int n) {
    int pPrevPrev = 1, pPrev = 1, pCurr = 1, pNext = 1;
    for ( int i = 3;
    i <= n;
    i ++ ) {
      pNext = pPrevPrev + pPrev;
      pPrevPrev = pPrev;
      pPrev = pCurr;
      pCurr = pNext;
    }
    return pNext;
  }