title: Number Is Divisible By 29 Or Not
signature: numberIsDivisibleBy29OrNot :: Integer -> Bool
  numberIsDivisibleBy29OrNot n = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Bool -> Bool -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Bool -> String
  driver n expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (29) (True) )
  
      printf "TEST-1...%s\n" (driver (0) (True) )
  
      printf "TEST-2...%s\n" (driver (65) (False) )
  
      printf "TEST-3...%s\n" (driver (1419) (False) )
  
      printf "TEST-4...%s\n" (driver (54) (False) )
  
      printf "TEST-5...%s\n" (driver (7) (False) )
  
      printf "TEST-6...%s\n" (driver (44) (False) )
  
      printf "TEST-7...%s\n" (driver (34) (False) )
  
      printf "TEST-8...%s\n" (driver (1160) (True) )
  
      printf "TEST-9...%s\n" (driver (292929002929) (True) )
  
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 );
  }