title: Number Is Divisible By 29 Or Not
signature: function number_is_divisible_by_29_or_not(n)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(n, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(29, true);
      @printf("TEST-0...%s\n",result);
      
      result = driver(0, true);
      @printf("TEST-1...%s\n",result);
      
      result = driver(65, false);
      @printf("TEST-2...%s\n",result);
      
      result = driver(1419, false);
      @printf("TEST-3...%s\n",result);
      
      result = driver(54, false);
      @printf("TEST-4...%s\n",result);
      
      result = driver(7, false);
      @printf("TEST-5...%s\n",result);
      
      result = driver(44, false);
      @printf("TEST-6...%s\n",result);
      
      result = driver(34, false);
      @printf("TEST-7...%s\n",result);
      
      result = driver(1160, true);
      @printf("TEST-8...%s\n",result);
      
      result = driver(292929002929, true);
      @printf("TEST-9...%s\n",result);
      
  end
  
  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 );
  }