

'''simple docstring'''






from __future__ import annotations

import math


def 		_A     (    A__      ):






 """simple docstring"""



 if 1 < number < 4:
  # 2 and 3 are primes
  return True
 elif number < 2 or number % 2 == 0 or number % 3 == 0:
  # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
  return False

 # All primes number are in format of 6k +/- 1
 for i in range(5     ,				int(math.sqrt(A__      ) + 1      )     ,				6      ):
  if number % i == 0 or number % (i + 2) == 0:
   return False
 return True


def 		_A     (    A__      ):






 """simple docstring"""



 __lowercase							  = str(A__      )
 __lowercase							  = [n]
 for i in range(1     ,				len(A__      )      ):
  list_nums.append(int(str_num[i:]      )      )
  list_nums.append(int(str_num[:-i]      )      )
 return list_nums


def 		_A     (    A__      ):






 """simple docstring"""



 if len(str(A__      )      ) > 3:
  if not is_prime(int(str(A__      )[-3:]      )      ) or not is_prime(int(str(A__      )[:3]      )      ):
   return False
 return True


def 		_A     (    A__ = 11      ):






 """simple docstring"""



 __lowercase							  = []
 __lowercase							  = 13
 while len(A__      ) != count:
  if validate(A__      ):
   __lowercase							  = list_truncated_nums(A__      )
   if all(is_prime(A__      ) for i in list_nums      ):
    list_truncated_primes.append(A__      )
  num += 2
 return list_truncated_primes


def 		_A     (    ):






 """simple docstring"""



 return sum(compute_truncated_primes(11      )      )


if __name__ == "__main__":
 print(f'{sum(compute_truncated_primes(11)) = }')




'''simple docstring'''






import os

lowerCAmelCase__											=	{'''I''': 1, '''V''': 5, '''X''': 10, '''L''': 50, '''C''': 100, '''D''': 500, '''M''': 1000}


def 		_A     (    A__      ):






 """simple docstring"""



 __lowercase							  = 0

 __lowercase							  = 0
 while index < len(A__      ) - 1:
  __lowercase							  = SYMBOLS[numerals[index]]
  __lowercase							  = SYMBOLS[numerals[index + 1]]
  if current_value < next_value:
   total_value -= current_value
  else:
   total_value += current_value
  index += 1
 total_value += SYMBOLS[numerals[index]]

 return total_value


def 		_A     (    A__      ):






 """simple docstring"""



 __lowercase							  = ''''''

 __lowercase							  = num // 1000
 numerals += m_count * "M"
 num %= 1000

 __lowercase							  = num // 100
 if c_count == 9:
  numerals += "CM"
  c_count -= 9
 elif c_count == 4:
  numerals += "CD"
  c_count -= 4
 if c_count >= 5:
  numerals += "D"
  c_count -= 5
 numerals += c_count * "C"
 num %= 100

 __lowercase							  = num // 10
 if x_count == 9:
  numerals += "XC"
  x_count -= 9
 elif x_count == 4:
  numerals += "XL"
  x_count -= 4
 if x_count >= 5:
  numerals += "L"
  x_count -= 5
 numerals += x_count * "X"
 num %= 10

 if num == 9:
  numerals += "IX"
  num -= 9
 elif num == 4:
  numerals += "IV"
  num -= 4
 if num >= 5:
  numerals += "V"
  num -= 5
 numerals += num * "I"

 return numerals


def 		_A     (    A__ = "/p089_roman.txt"      ):






 """simple docstring"""



 __lowercase							  = 0

 with open(os.path.dirname(A__      ) + roman_numerals_filename      ) as filea:
  __lowercase							  = filea.readlines()

 for line in lines:
  __lowercase							  = line.strip()
  __lowercase							  = parse_roman_numerals(A__      )
  __lowercase							  = generate_roman_numerals(A__      )
  savings += len(A__      ) - len(A__      )

 return savings


if __name__ == "__main__":
 print(f'{solution() = }')

