title: Possible To Make A Divisible By 3 Number Using All Digits In An Array
signature: possibleToMakeADivisibleBy3NumberUsingAllDigitsInAnArray :: [Integer] -> Integer -> Bool
  possibleToMakeADivisibleBy3NumberUsingAllDigitsInAnArray arr 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] -> Integer -> Bool -> String
  driver arr n expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME arr n) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver ([2, 4, 9, 11, 12, 15, 16, 19, 21, 21, 23, 23, 24, 30, 31, 31, 32, 34, 37, 41, 41, 43, 45, 46, 47, 54, 58, 60, 62, 66, 66, 74, 74, 75, 75, 77, 77, 85, 89, 90, 92, 92, 93, 95, 98]) (30) (False) )
  
      printf "TEST-1...%s\n" (driver ([0, 66, 92, 24, -8, 88, -92, 86, 80, 82, 42, -20, -56, -2, -84, 32]) (14) (False) )
  
      printf "TEST-2...%s\n" (driver ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) (29) (True) )
  
      printf "TEST-3...%s\n" (driver ([99, 83, 11, 99, 80, 76, 32, 12, 94, 66, 76]) (5) (True) )
  
      printf "TEST-4...%s\n" (driver ([-88, -84, -80, -80, -80, -80, -72, -68, -64, -62, -60, -52, -48, -44, -36, -24, -20, -18, -14, -8, -6, -6, -4, 6, 10, 14, 18, 24, 26, 26, 50, 50, 52, 60, 76, 90, 96, 98]) (19) (True) )
  
      printf "TEST-5...%s\n" (driver ([0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1]) (14) (False) )
  
      printf "TEST-6...%s\n" (driver ([6, 6, 8, 8, 10, 24, 24, 26, 27, 30, 34, 34, 36, 36, 39, 40, 41, 44, 45, 50, 52, 53, 57, 62, 64, 64, 70, 71, 72, 78, 78, 79, 80, 82, 89, 95, 96]) (28) (False) )
  
      printf "TEST-7...%s\n" (driver ([-28, -84, -14, -20, -14, -26, 28, -66, 48, 82, -46, -10, -94, 76, 56, -6, 72, -92, -32, 66, 50, -72, 64, 12, 48, 88, -36, -12, -6, -18, -36, -34, 44, 40, -54]) (25) (False) )
  
      printf "TEST-8...%s\n" (driver ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) (19) (False) )
  
      printf "TEST-9...%s\n" (driver ([17, 47, 89, 75, 57, 69, 70, 57, 83, 79, 57, 49]) (8) (False) )
  
source_py: def possible_to_make_a_divisible_by_3_number_using_all_digits_in_an_array(arr, n):
      remainder = 0
      for i in range(0, n):
          remainder = ((remainder + arr[i]) % 3)
      return (remainder == 0)
source_cpp: bool possible_to_make_a_divisible_by_3_number_using_all_digits_in_an_array(vector<int> arr, int n) {
    int remainder = 0;
    for ( int i = 0;
    i < n;
    i ++ ) remainder = ( remainder + arr [ i ] ) % 3;
    return ( remainder == 0 );
  }