project-euler/179_consecutive_positive_di...

14 lines
216 B
Python

#!/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)