Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
Python:
N = int(input())
count = 0
for i in range(1, N + 1):
if N % i == 0:
count += 1
print(count)
Hãy giúp mọi người biết câu trả lời này thế nào?
Code
import math
def primeFactors(n):
lst = []
while n % 2 == 0:
lst.append(2)
n = n / 2
for i in range(3,int(math.sqrt(n))+1,2):
while n % i== 0:
lst.append(i)
n = n / i
if n > 2:
lst.append(n)
return lst
n = int(input())
lst = primeFactors(n)
uoc = 1
for x in list(set(lst)):
uoc *= (lst.count(x)+1)
print(uoc)
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin
231
2859
303
2 sao
314
3288
665
:vv
231
2859
303
off
314
3288
665
:v
1140
23
1814
Onl hog?
314
3288
665
=)
1644
32740
1900
:v
314
3288
665
=)