Untitled

this is the original problem -> https://www.codewars.com/kata/55aa075506463dac6600010d/train/python
mail@pastecode.io avatar
unknown
python
3 years ago
316 B
10
Indexable
Never
def list_squared(m, n):
    solution = []
    
    while m < n:
        divisors_sum = 0
        for i in range(1, m+1):
            if m % i == 0:
                divisors_sum += i**2
        if (divisors_sum**(1/2)).is_integer():
            solution.append([m, divisors_sum])
        m+=1
    
    return solution