title: Number Is Divisible By 29 Or Not
signature: function numberIsDivisibleBy29OrNot($n) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($n, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($n), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      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));
      
  }
  
  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 );
  }