class Solution:
def encrypt(self, num):
t = 0
b = 0
n = []
while True:
n.append(num%10)
num = int(num/10)
t += 1
if num == 0:
break
m = max(n)
for i in range(t):
b += m*10**i
return b
def sumOfEncryptedInt(self, nums):
sum = 0
for num in nums:
sec = self.encrypt(num)
sum += sec
return sum
if __name__ == '__main__':
nums = [10,21,31]
Solution = Solution()
sum = Solution.sumOfEncryptedInt(nums)
print(sum)