# You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which should be interpreted as the word1 + word2 = word3 cryptarithm
# Write a solution where if crypt, when it is decoded by replacing all of the letters in the cryptarithm with digits using the mapping in solution, becomes a valid arithmetic equation containing no numbers with leading zeroes, the answer is true. If it does not become a valid arithmetic solution, the answer is false

def isCryptSolution(crypt, solution):
	# map letters to given numbers
	dic = {}
	for key in solution:
		dic[key[0]] = int(key[1])

@@ -741,8 +741,163 @@
 key%5B1%5D)%0A
+%0A%09# generate input strings into numbers%0A%09arr = %5B%5D%0A%09for string in crypt:%0A%09%09arr.append(0)%0A%09%09for letter in string:%0A%09%09%09arr%5B-1%5D = arr%5B-1%5D*10 + dic%5Bletter%5D%0A%0A%09%09%09%0A

Generate input strings into numbers