Deepak Patra
Last Activity: 10 Years ago
Hello Student,
Please find the answer to your question
Ans. The sum of integers from 1 to 100 that are divisible by 2 or = sum of integers from 1 to 100 divisible by 2 + sum of integers from 1 to 100 divisible by 5 – sum of integers from 1 to 100 divisible by 10 = (2 + 4 + 6 + ….. + 100) + (5 + 10 + 15 + ….. + 100 ) – (10 + 20 + ……… + 100)
= 50/2 [2 * 10 + 9 * 10] = 2550 + 1050 – 550 = 3050
Thanks
Deepak Patra
askIITians Faculty