3079. Find the Sum of Encrypted Integers
On This Page
class Solution:
def sumOfEncryptedInt(self, nums: List[int]) -> int:
s = 0
for num in nums:
str_num = str(num)
max_digit = max(str_num)
encrypted_num = int(max_digit * len(str_num))
s += encrypted_num
return s