Project Euler #1: Multiples of 3 and 5

  • + 1 comment

    t = int(input().strip()) for a0 in range(t): n = int(input().strip()) c=0 for p in range(n): if p%3==0 or p%5==0 and p%15!=0: c=c+p print(c) why time limit exceed in this code