Convert into the list and then store the value..
Code\n\nclass Solution:\n    def minimumSum(self, num: int) -> int:\n        nums=list(str(num))\n        nums.sort()\n        return int(nums[0]+nums[-1])+int(
# Code\n```\nclass Solution:\n    def minimumSum(self, num: int) -> int:\n        nums=list(str(num))\n        nums.sort()\n        return int(nums[0]+nums[-1])+int(nums[1]+nums[2])\n        \n```
['Python3']