当前位置:网站首页>LeetCode 2011. Variable Value After Action (Simple)
LeetCode 2011. Variable Value After Action (Simple)
2022-08-10 05:55:00 【Shengxin Research Ape】
python
class Solution:
def finalValueAfterOperations(self, operations: List[str]) -> int:
x = 0
for i in range(len(operations)):
if(operations[i][1]=='+'):
x +=1
else:
x -=1
return x

边栏推荐
猜你喜欢

LeetCode 面试题17.14 最小k个数(中等)

The latest and most complete digital collection sales calendar-07.26

IO stream【】【】【】

R语言聚类分析——代码解析

Collection tool class

LeetCode 1894.找到需要补充粉笔的学生编号

Chain Reading Recommendation: From Tiles to Generative NFTs

树结构——2-3树图解

菜谱小程序源码免费分享【推荐】

I use this recruit let the team to improve the development efficiency of 100%!
随机推荐
Chain Reading|The latest and most complete digital collection sales calendar-08.02
力扣——统计只差一个字符的子串数目
LeetCode 292.Nim 游戏(简单)
Privatisation build personal network backup NextCloud
探索性数据分析EDA
Batch add watermark to pictures batch add background zoom batch merge tool picUnionV4.0
WeChat applet wx.writeBLECharacteristicValue Chinese character to buffer problem
Machine Learning - Clustering - Shopping Mall Customer Clustering
机器学习——聚类——商场客户聚类
常用类 BigDecimal
链读推荐:从瓷砖到生成式 NFT
图片批量添加水印批量加背景缩放批量合并工具picUnionV4.0
Notes 1
菜谱小程序源码免费分享【推荐】
view【】【】【】【】
链读好文:热加密存储与冷加密存储有什么区别?
各个架构指令集对应的机型
Reflection 【Notes】
MySQL中MyISAM为什么比InnoDB查询快
链读好文:Jeff Garzik 推出 Web3 制作公司