3079. Find the Sum of Encrypted Integers
You are given an integer array
numscontaining positive integers. We define a functionencryptsuch thatencrypt(x)replaces every digit inxwith the largest digit inx. For example,encrypt(523) = 555andencrypt(213) = 333.Return the sum of encrypted elements.