Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
921
serega1112
Dec 23rd, 2020
(
edited
)
119
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Python
0.32 KB
| None
|
0
0
raw
download
clone
embed
print
report
class
Solution:
def
minAddToMakeValid
(
self
,
S:
str
)
-
>
int
:
count
=
0
res
=
0
for
c
in
S:
if
c
==
'('
:
count +
=
1
elif
count:
count -
=
1
else
:
res +
=
1
return
res + count
Add Comment
Please,
Sign In
to add comment
Public Pastes
Free Money Method
PHP | 1 hour ago | 0.39 KB
free money glitch
HTML 5 | 1 hour ago | 0.39 KB
Free Crypto MethodGuide
BrainFuck | 1 hour ago | 0.39 KB
Quick Mney Metd 2025
HTML 5 | 1 hour ago | 0.39 KB
Crypto Exploit
Smarty | 1 hour ago | 0.39 KB
FREE ETHEREUM METHOD
CSS | 1 hour ago | 0.39 KB
Monetizing Method
Python | 1 hour ago | 0.39 KB
Crypto Exploit
Make | 1 hour ago | 0.39 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!