title: Check Large Number Divisible 13 Not
signature: def check_large_number_divisible_13_not(num):
source_py: def check_large_number_divisible_13_not(num):
      length = len(num)
      if ((length == 1) and (num[0] == '0')):
          return True
      if ((length % 3) == 1):
          num = (str(num) + '00')
          length += 2
      elif ((length % 3) == 2):
          num = (str(num) + '0')
          length += 1
      sum = 0
      p = 1
      for i in range((length - 1), (- 1), (- 1)):
          group = 0
          group += (ord(num[i]) - ord('0'))
          i -= 1
          group += ((ord(num[i]) - ord('0')) * 10)
          i -= 1
          group += ((ord(num[i]) - ord('0')) * 100)
          sum = (sum + (group * p))
          p *= (- 1)
      sum = abs(sum)
      return ((sum % 13) == 0)
source_cpp: bool check_large_number_divisible_13_not(string num) {
    int length = num . size ( );
    if ( length == 1 && num [ 0 ] == '0' ) return true;
    if ( length % 3 == 1 ) {
      num += "00";
      length += 2;
    }
    else if ( length % 3 == 2 ) {
      num += "0";
      length += 1;
    }
    int sum = 0, p = 1;
    for ( int i = length - 1;
    i >= 0;
    i -- ) {
      int group = 0;
      group += num [ i -- ] - '0';
      group += ( num [ i -- ] - '0' ) * 10;
      group += ( num [ i ] - '0' ) * 100;
      sum = sum + group * p;
      p *= ( - 1 );
    }
    sum = abs ( sum );
    return ( sum % 13 == 0 );
  }
question_info.test_code: import array
  import bisect
  import collections
  import datetime
  import functools
  import heapq
  import itertools
  import math
  import queue
  import re
  import string
  import sys
  from typing import Any, Dict, List, Optional, Set
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  def validate_solution(actual, expected):
      return actual == expected
  
  def driver(num, expected):
      try:
          if validate_solution(PLACEHOLDER_FN_NAME(
              num),
              expected
          ):
              return "PASSED"
          return "FAILED"
      except Exception as exception_obj:
          return type(exception_obj).__name__
      
  if __name__ == "__main__":
      result = driver("vzTUaItpCpLnjY", False)
      print(f"TEST-0...{result}")
  
      result = driver("33855", True)
      print(f"TEST-1...{result}")
  
      result = driver("0011110101011", True)
      print(f"TEST-2...{result}")
  
      result = driver("MMQ", False)
      print(f"TEST-3...{result}")
  
      result = driver("439340517954", True)
      print(f"TEST-4...{result}")
  
      result = driver("000000000", True)
      print(f"TEST-5...{result}")
  
      result = driver("UugAuRRJbjEgl", True)
      print(f"TEST-6...{result}")
  
      result = driver("6406553695441", True)
      print(f"TEST-7...{result}")
  
      result = driver("011001", True)
      print(f"TEST-8...{result}")
  
      result = driver("yjFqEEvgiNjEX", True)
      print(f"TEST-9...{result}")
  
      sys.exit(0)
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
question_info.entry_fn_name: check_large_number_divisible_13_not
question_info.test_list: [{"idx": 0, "outputs": false, "inputs": {"num": "vzTUaItpCpLnjY"}}, {"idx": 1, "outputs": true, "inputs": {"num": "33855"}}, {"idx": 2, "outputs": true, "inputs": {"num": "0011110101011"}}, {"idx": 3, "outputs": false, "inputs": {"num": "MMQ"}}, {"idx": 4, "outputs": true, "inputs": {"num": "439340517954"}}, {"idx": 5, "outputs": true, "inputs": {"num": "000000000"}}, {"idx": 6, "outputs": true, "inputs": {"num": "UugAuRRJbjEgl"}}, {"idx": 7, "outputs": true, "inputs": {"num": "6406553695441"}}, {"idx": 8, "outputs": true, "inputs": {"num": "011001"}}, {"idx": 9, "outputs": true, "inputs": {"num": "yjFqEEvgiNjEX"}}]
question_info.entry_cls_name: Solution