3079. Find the Sum of Encrypted Integers
Содержание
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