当前位置:网站首页>LeetCode 2011.执行操作后的变量值(简单)
LeetCode 2011.执行操作后的变量值(简单)
2022-08-10 05:32:00 【生信研究猿】
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
边栏推荐
猜你喜欢
MySql constraints
ORACLE system table space SYSTEM is full and cannot expand table space problem solving process
Timer (setInterval) on and off
The latest and most complete digital collection sales calendar-07.27
transaction, storage engine
Chain Reading|The latest and most complete digital collection sales calendar-08.02
The Principle of Union Search and API Design
Common class BigDecimal
Count down the six weapons of the domestic interface collaboration platform!
String common methods
随机推荐
数据库 笔记 创建数据库、表 备份
tinymce rich text editor
程序员副业赚钱之道,实现月收入增加20K
view【】【】【】【】
深度学习TensorFlow入门环境配置
wiki confluence 安装
Timer (setInterval) on and off
cesium listens to map zoom or zoom to control whether the content added on the map is displayed
IO流【】【】【】
Operation table Function usage
网络安全3
R语言聚类分析——代码解析
Notes 1
Collection set interface
并查集原理与API设计
impdp import data
棋类游戏-五子棋小游戏
微信小程序-小程序的宿主环境
The complex "metaverse" will be interpreted for you, and the Link Reading APP will be launched soon!
shell脚本中利用sqlplus操作数据库