So the sum of numbers divisible by 5 from 1 to 100 is: 5 * (1+2+…+20) = 5 * (1+20) * 20/2 =1050;
Sum of numbers divisible by 3: 3 * (1+…+33) * 33/2 =1683;
Sum of numbers divisible by 3 and 5 (that is, divisible by 15):15 * (1+…+6) * 6/2 = 315;
So the result is (1+2+…+100)-1050-1683+315 = 2632.