So im taking a programming class and we were given an assigment, where you get 2 numbers, x and y, x<y, and you need to find how many numbers between those 2 numbers including the 2 numbers is divisible by atleast one of 2,3,5. They run tests that time out in a second, the problem i have is i have a brute force method with a for and 3 ifs checking every number individually, can anyone help me come up with a solution that will not take as much time, im really out of ideas at this point. Not too advanced if can please, im still a noob. Thanks