FPEvalDataset/LeetCodeProblem
0305
1{2 "id": 3367,3 "name": "find_the_sum_of_encrypted_integers",4 "difficulty": "Easy",5 "link": "https://leetcode.com/problems/find-the-sum-of-encrypted-integers/",6 "date": "2024-03-02 00:00:00",7 "task_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_. **Example 1:** **Input: **nums = [1,2,3] **Output: **6 **Explanation:** The encrypted elements are `[1,2,3]`. The sum of encrypted elements is `1 + 2 + 3 == 6`. **Example 2:** **Input: **nums = [10,21,31] **Output: **66 **Explanation:** The encrypted elements are `[11,22,33]`. The sum of encrypted elements is `11 + 22 + 33 == 66`. **Constraints:** `1 <= nums.length <= 50` `1 <= nums[i] <= 1000`",8 "public_test_cases": [9 {10 "label": "Example 1",11 "input": "nums = [1,2,3]",12 "output": "6 "13 },14 {15 "label": "Example 2",16 "input": "nums = [10,21,31]",17 "output": "66 "18 }19 ],20 "private_test_cases": [21 {22 "input": [23 529,24 735,25 801,26 668,27 823,28 372,29 825,30 297,31 272,32 429,33 236,34 727,35 149,36 130,37 931,38 606,39 773,40 656,41 427,42 16,43 14,44 63,45 231,46 330,47 379,48 938,49 320,50 490,51 603,52 106,53 59,54 421,55 356,56 348,57 976,58 597,59 819,60 91361 ],62 "output": 2713763 },64 {65 "input": [66 141,67 371,68 116,69 440,70 168,71 282,72 3,73 893,74 952,75 304,76 883,77 707,78 32079 ],80 "output": 855081 },82 {83 "input": [84 269,85 229,86 351,87 25088 ],89 "output": 310890 },91 {92 "input": [93 980,94 926,95 437,96 990,97 825,98 97,99 812,100 258,101 360,102 769,103 773104 ],105 "output": 8979106 },107 {108 "input": [109 62,110 259,111 782,112 150,113 283,114 92,115 982,116 577,117 385,118 317,119 559120 ],121 "output": 7935122 }123 ],124 "haskell_template": "sumOfEncryptedInt :: [Int] -> Int\nsumOfEncryptedInt nums ",125 "ocaml_template": "let sumOfEncryptedInt (nums: int list) : int = ",126 "scala_template": "def sumOfEncryptedInt(nums: List[Int]): Int = { \n \n}",127 "java_template": "class Solution {\n public int sumOfEncryptedInt(int[] nums) {\n \n }\n}",128 "python_template": "class Solution(object):\n def sumOfEncryptedInt(self, nums):\n \"\"\"\n :type nums: List[int]\n :rtype: int\n \"\"\"\n "129}