08 04 25
08 04 25
"""
:rtype: List[int]
"""
for i in range(len(nums)):
return [i, j]
‘’’
2)class Solution(object):
"""
:type n: int
:rtype: int
"""
if n % 2 == 0:
return n
else:
return n * 2
‘’’
3) class Solution(object):
def is_prime(x):
if x % i == 0: return False
return True
if 8 <= n <= 11: return 11
s = str(half)
return pal
‘’’
4) class Solution(object):
"""
:type n: int
:rtype: int
"""
count = 0
while n >= 5:
n //= 5
count += n
return count
‘’’
5) class Solution(object):
"""
:type n: int
:rtype: bool
"""
def is_prime(x):
if x % i == 0:
return False
return True
root = int(n**0.5)
‘’’
6) class Solution(object):
"""
:type a: int
:type b: int
:rtype: int
"""
count = 0
if a % i == 0 and b % i == 0:
count += 1
return count
‘’’
7) class Solution(object):
"""
:rtype: int
"""
return num
‘’’