avatar
Siz Long

My name is Siz. I am a computer science graduate student specializing in backend development with Golang and Python, seeking opportunities in innovative tech projects. My personal website is me.longsizhuo.com .Connect with me on LinkedIn: https://www.linkedin.com/in/longsizhuo/.

  • Resume
  • Archives
  • Categories
  • Photos
  • Music



{{ date }}

{{ time }}

avatar
Siz Long

My name is Siz. I am a computer science graduate student specializing in backend development with Golang and Python, seeking opportunities in innovative tech projects. My personal website is me.longsizhuo.com .Connect with me on LinkedIn: https://www.linkedin.com/in/longsizhuo/.

  • 主页
  • Resume
  • Archives
  • Categories
  • Photos
  • Music

LCP 50.Gem supply

  2024-01-01        
字数统计: 58字   |   阅读时长: 1min

topic:

screenshot2023-09-15 afternoon2.23.12.png
topic链接

Thought:

LCPThe beginning is the meaning of novice village,简单的simulation,Traversaloperations,rightgemCalculate the addition and subtraction。

Code:

1
2
3
4
5
6
7
class Solution:
def giveGem(self, gem: List[int], operations: List[List[int]]) -> int:
for i, j in operations:
trade = gem[i] // 2
gem[i] -= trade
gem[j] += trade
return max(gem)-min(gem)
  • Python
  • answer
  • Array
  • simulation

扫一扫,分享到微信

微信分享二维码
LCP 06.Coin
GOlanguage# GOlanguage可爱捏
目录
  1. 1. topic:
  2. 2. Thought:
  3. 3. Code:

153 篇 | 133k
次 | 人
这里自动载入天数这里自动载入时分秒
2022-2025 loong loong | 新南威尔士龙龙号