num=0

for a in range(1000):

if (a%3)==0 or (a%5)==0:

num=num+a

print num


1000이하 3배수 5배수 다더하는건데


더하는게 잘안댐