Not sure if I should\'ve posted this on math.stackexchange instead, but it includes more programming so I posted it here.
The question seems really simple, but I\'ve
t = int(input()) for a in range(t): n = int(input().strip()) sum=0 for i in range(0,n): if i%3==0 or i%5==0: sum=sum+i print(sum)