title: Cassinis Identity
signature: cassinis_identity <- 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(
          67L, 
          -1L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          2L, 
          1L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          58L, 
          1L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          6L, 
          1L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          42L, 
          1L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          17L, 
          -1L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          37L, 
          -1L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          44L, 
          1L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          23L, 
          -1L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          40L, 
          1L
      )))
  
  }
  
  main()
source_py: def cassinis_identity(n):
      return ((- 1) if (n & 1) else 1)
source_cpp: int cassinis_identity(int n) {
    return ( n & 1 ) ? - 1 : 1;
  }