#3079
Find the Sum of Encrypted Integers
easy · 74.8% accepted · 135 likes · top 85%
Description
You are given an integer array nums containing positive integers. We define a function encrypt such that encrypt(x) replaces every digit in x with the largest digit in x. For example, encrypt(523) = 555 and encrypt(213) = 333.
Return the sum of encrypted elements.
Solution