方法1
n = int(input())
sum_n = 0
for i in range(1,n+1):
if i % 7 == 0:
sum_n += i
print(sum_n)
735
方法2
n = 100
x = [ i for i in range(1,n) if i % 7 == 0 ]
print(x)
print(sum(x))
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
735