title: Number Is Divisible By 29 Or Not
signature: number_is_divisible_by_29_or_not <- 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(
          29L, 
          TRUE
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          0L, 
          TRUE
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          65L, 
          FALSE
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          1419L, 
          FALSE
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          54L, 
          FALSE
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          7L, 
          FALSE
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          44L, 
          FALSE
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          34L, 
          FALSE
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          1160L, 
          TRUE
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          292929002929L, 
          TRUE
      )))
  
  }
  
  main()
source_py: def number_is_divisible_by_29_or_not(n):
      while int((n / 100)):
          last_digit = int((n % 10))
          n = int((n / 10))
          n += (last_digit * 3)
      return ((n % 29) == 0)
source_cpp: bool number_is_divisible_by_29_or_not(long long int n) {
    while ( n / 100 ) {
      int last_digit = n % 10;
      n /= 10;
      n += last_digit * 3;
    }
    return ( n % 29 == 0 );
  }