TCS
Company
Sum of all naturl no less than 200 that are divisible neither by 3nor by 5 is?
Read Solution (Total 8)
-
- Ans will be 10732
(1+2+……….+200)-{(3+6+…..+198)+(5+10+…………+200)-(15+30+……………..195)}
[as 15,30,45…….195 is terms are taken twice for 3 as well as 5,so have to subtract from their summation ]
=(20100)-{6633+4100-1365}
=20100-9368
=10732
- 11 years agoHelpfull: Yes(32) No(2)
- 3,6,......198
66*(3+198)/2=6633
5,10,....200
40*(5+200)/2=4100
1,2,3....200
=20100
20100-4100-6633=9367 - 11 years agoHelpfull: Yes(4) No(9)
- number of numbers from 3 to 198 are 198/3=66
thats why its 66*(3+198)/2 - 11 years agoHelpfull: Yes(3) No(3)
- (1+2+3+4+5+........+200)-(3+6+9+......+198)-(5+10+15+20+.....+200)=(200/2(200+1))-(60/2(3+198))-(40/2(5+200))=20100-6030-4100=9970
- 11 years agoHelpfull: Yes(1) No(1)
- but some numbers are common like-
15,30,45,75,.....
so, 2 times we can't subtract - 11 years agoHelpfull: Yes(1) No(0)
- why everyone took a last no. is 200 while here is written it should be less than 200
- 11 years agoHelpfull: Yes(1) No(0)
- @vinod why 66?
- 11 years agoHelpfull: Yes(0) No(0)
- (1+200)*100-(15+195)*13/2=20100-1430=18670
- 11 years agoHelpfull: Yes(0) No(0)
TCS Other Question