title: Padovan Sequence
signature: fun padovanSequence(n: Int): Long {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Long, expected:Long):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Long):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(1, 1)
      println("TEST-0...${result}")
      
      result = driver(92, 124155792775)
      println("TEST-1...${result}")
      
      result = driver(29, 2513)
      println("TEST-2...${result}")
      
      result = driver(52, 1618192)
      println("TEST-3...${result}")
      
      result = driver(55, 3761840)
      println("TEST-4...${result}")
      
      result = driver(13, 28)
      println("TEST-5...${result}")
      
      result = driver(83, 9882257736)
      println("TEST-6...${result}")
      
      result = driver(83, 9882257736)
      println("TEST-7...${result}")
      
      result = driver(10, 12)
      println("TEST-8...${result}")
      
      result = driver(67, 109870576)
      println("TEST-9...${result}")
      
          
  }
  
  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;
  }