#3079
Find the Sum of Encrypted Integers
newbie · 245 · lc easy +18 · 74.8% accepted · 135 likes · top 85%
Description
Given a positive-integer array nums, define encrypt(x) as the number formed by replacing every digit of x with its largest digit (e.g., encrypt(523) = 555). Return the sum of encrypt(x) for all elements of nums.
Code
1
2
3