+0  
 
0
23
3
avatar

The sum of all positive integers less than 400 which are divisible by 5.

 Jan 14, 2020
 #2
avatar
+1

listfor(n, 1, 395/5, n*5)

 

OUTPUT: (5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, 320, 325, 330, 335, 340, 345, 350, 355, 360, 365, 370, 375, 380, 385, 390, 395) = 15,800

 
 Jan 14, 2020
 #3
avatar+106930 
+1

It is an AP

5,10, .....  395  

395/5 = 79

 

sum=n/2(a+L) = 79/2  *  (5+395) = 79/2  * 400 = 79*200 = 15800

 
 Jan 14, 2020

28 Online Users

avatar
avatar
avatar
avatar
avatar
avatar