a = [i for i in range(1,int(input('n = '))+1)]
b = 0
for i in range(len(a)):
if i % 5 != 0: b+=i
print(b)
Вроде так ~~
a = [i for i in range(1,int(input('n = '))+1)]
b = 0
for i in range(len(a)):
if i % 5 != 0: b+=i
print(b)
Вроде так ~~