project-euler/179_consecutive_positive_di...

14 lines
216 B
Python
Raw Normal View History

2023-03-25 17:24:17 +01:00
#!/usr/bin/env python3
lim = 10**7
divcount = [1]*lim
count = 0
for n in range(2, lim):
for i in range(n, lim, n):
divcount[i] += 1
if divcount[n] == divcount[n-1]:
count += 1
print(count)