当前位置:网站首页>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

边栏推荐
- 先人一步,不再错过,链读APP即将上线!
- Linux database Oracle client installation, used for shell scripts to connect to the database with sqlplus
- Models corresponding to each architecture instruction set
- Reprint fstream, detailed usage of ifstream
- Timer (setInterval) on and off
- 细说MySql索引原理
- 一个基于.Net Core 开源的物联网基础平台
- Four characteristics of ACID
- 事务、存储引擎
- Link reading good article: What is the difference between hot encrypted storage and cold encrypted storage?
猜你喜欢

I use this recruit let the team to improve the development efficiency of 100%!

Batch add watermark to pictures batch add background zoom batch merge tool picUnionV4.0

LeetCode 剑指offer 21.调整数组顺序使奇数位于偶数前面(简单)

一个基于.Net Core跨平台小程序考试系统

集合 Map

先人一步,不再错过,链读APP即将上线!

IO stream【】【】【】

ORACLE系统表空间SYSTEM占满无法扩充表空间问题解决过程

Collection set interface

视图【】【】【】【】
随机推荐
Count down the six weapons of the domestic interface collaboration platform!
链读精选:星巴克着眼于数字收藏品并更好地吸引客户
Mini Program Study Notes: Communication between Mini Program Components
A timeout error is reported when connecting to Nacos
网络安全作业
Reprint fstream, detailed usage of ifstream
作业实验四
一个基于.Net Core 开源的物联网基础平台
Ten years of sharpening a sword!The digital collection market software, Link Reading APP is officially open for internal testing!
Link reading good article: What is the difference between hot encrypted storage and cold encrypted storage?
力扣——省份数量
网络安全之防火墙
微信小程序-小程序的宿主环境
ZigBee 网络设备相关内容
Index Notes【】【】
笔记1
Operation table Function usage
Collection工具类
集合 Map
先人一步,不再错过,链读APP即将上线!