title: Remainder 7 Large Numbers
signature: def remainder_7_large_numbers(num):
source_py: def remainder_7_large_numbers(num):
      series = [1, 3, 2, (- 1), (- 3), (- 2)]
      series_index = 0
      result = 0
      for i in range((len(num) - 1), (- 1), (- 1)):
          digit = (ord(num[i]) - 48)
          result += (digit * series[series_index])
          series_index = ((series_index + 1) % 6)
          result %= 7
      if (result < 0):
          result = ((result + 7) % 7)
      return result
source_cpp: int remainder_7_large_numbers(string num) {
    int series [ ] = {
      1, 3, 2, - 1, - 3, - 2 };
      int series_index = 0;
      int result = 0;
      for ( int i = num . size ( ) - 1;
      i >= 0;
      i -- ) {
        int digit = num [ i ] - '0';
        result += digit * series [ series_index ];
        series_index = ( series_index + 1 ) % 6;
        result %= 7;
      }
      if ( result < 0 ) result = ( result + 7 ) % 7;
      return result;
    }
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("K", 6)
      print(f"TEST-0...{result}")
  
      result = driver("850076", 3)
      print(f"TEST-1...{result}")
  
      result = driver("00111", 6)
      print(f"TEST-2...{result}")
  
      result = driver("X", 5)
      print(f"TEST-3...{result}")
  
      result = driver("1", 1)
      print(f"TEST-4...{result}")
  
      result = driver("10010001100", 1)
      print(f"TEST-5...{result}")
  
      result = driver(" pgPeLz", 0)
      print(f"TEST-6...{result}")
  
      result = driver("53212456821275", 3)
      print(f"TEST-7...{result}")
  
      result = driver("101", 3)
      print(f"TEST-8...{result}")
  
      result = driver("V", 3)
      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: remainder_7_large_numbers
question_info.test_list: [{"idx": 0, "outputs": 6, "inputs": {"num": "K"}}, {"idx": 1, "outputs": 3, "inputs": {"num": "850076"}}, {"idx": 2, "outputs": 6, "inputs": {"num": "00111"}}, {"idx": 3, "outputs": 5, "inputs": {"num": "X"}}, {"idx": 4, "outputs": 1, "inputs": {"num": "1"}}, {"idx": 5, "outputs": 1, "inputs": {"num": "10010001100"}}, {"idx": 6, "outputs": 0, "inputs": {"num": " pgPeLz"}}, {"idx": 7, "outputs": 3, "inputs": {"num": "53212456821275"}}, {"idx": 8, "outputs": 3, "inputs": {"num": "101"}}, {"idx": 9, "outputs": 3, "inputs": {"num": "V"}}]
question_info.entry_cls_name: Solution