title: Padovan Sequence
signature: pub fn padovan_sequence(n: i32) -> i64 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i64, expected: i64)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: i64)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        1, 
        1
      ));
      
      println!("TEST-1...{}", driver(
        92, 
        124155792775
      ));
      
      println!("TEST-2...{}", driver(
        29, 
        2513
      ));
      
      println!("TEST-3...{}", driver(
        52, 
        1618192
      ));
      
      println!("TEST-4...{}", driver(
        55, 
        3761840
      ));
      
      println!("TEST-5...{}", driver(
        13, 
        28
      ));
      
      println!("TEST-6...{}", driver(
        83, 
        9882257736
      ));
      
      println!("TEST-7...{}", driver(
        83, 
        9882257736
      ));
      
      println!("TEST-8...{}", driver(
        10, 
        12
      ));
      
      println!("TEST-9...{}", driver(
        67, 
        109870576
      ));
      
  }
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;
  }