title: Padovan Sequence
signature: padovanSequence(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          1, 
          1)
      }");
  
      print("TEST-1...${driver(
          92, 
          124155792775)
      }");
  
      print("TEST-2...${driver(
          29, 
          2513)
      }");
  
      print("TEST-3...${driver(
          52, 
          1618192)
      }");
  
      print("TEST-4...${driver(
          55, 
          3761840)
      }");
  
      print("TEST-5...${driver(
          13, 
          28)
      }");
  
      print("TEST-6...${driver(
          83, 
          9882257736)
      }");
  
      print("TEST-7...${driver(
          83, 
          9882257736)
      }");
  
      print("TEST-8...${driver(
          10, 
          12)
      }");
  
      print("TEST-9...${driver(
          67, 
          109870576)
      }");
  
      return 0;
  }
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;
  }