July 19, 2021
import math
def solution(left, right):
answer = 0
for i in range(left, right + 1):
if math.sqrt(i) % 1 == 0:
answer -= i
else:
answer += i
return answer
def solution(left, right):
answer = 0
for i in range(left,right+1):
if int(i**0.5) == i**0.5:
answer -= i
else:
answer += i
return answer