Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
leetcode: finished #2706
Browse files Browse the repository at this point in the history
  • Loading branch information
xqm32 committed Jul 27, 2023
1 parent ecb8899 commit b5f7d28
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions content/leetcode/2023/7.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@ title: "2023.7"
draft: false
---

# 2023.7.27

```python
#
# @lc app=leetcode.cn id=2706 lang=python3
#
# [2706] 购买两块巧克力
#

# @lc code=start
from typing import List


class Solution:
def buyChoco(self, prices: List[int], money: int) -> int:
prices.sort()
return money - sum(prices[:2]) if sum(prices[:2]) <= money else money


# @lc code=end
```

# 2023.7.26

```python
Expand Down

0 comments on commit b5f7d28

Please sign in to comment.