title: Check Large Number Divisible 13 Not
signature: pub fn check_large_number_divisible_13_not(num: String) -> bool {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: bool, expected: bool)->bool{
  return actual==expected
  }
  pub fn driver(num: String, expected: bool)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(num), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        "vzTUaItpCpLnjY".to_string(), 
        false
      ));
      
      println!("TEST-1...{}", driver(
        "33855".to_string(), 
        true
      ));
      
      println!("TEST-2...{}", driver(
        "0011110101011".to_string(), 
        true
      ));
      
      println!("TEST-3...{}", driver(
        "MMQ".to_string(), 
        false
      ));
      
      println!("TEST-4...{}", driver(
        "439340517954".to_string(), 
        true
      ));
      
      println!("TEST-5...{}", driver(
        "000000000".to_string(), 
        true
      ));
      
      println!("TEST-6...{}", driver(
        "UugAuRRJbjEgl".to_string(), 
        true
      ));
      
      println!("TEST-7...{}", driver(
        "6406553695441".to_string(), 
        true
      ));
      
      println!("TEST-8...{}", driver(
        "011001".to_string(), 
        true
      ));
      
      println!("TEST-9...{}", driver(
        "yjFqEEvgiNjEX".to_string(), 
        true
      ));
      
  }
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 );
  }