+0  
 
-1
673
11
avatar+194 

(deleted)

 Apr 24, 2020
edited by somehelpplease  May 8, 2020
 #1
avatar
0

I wrote a computer program, and got 7200.

 Apr 24, 2020
 #3
avatar+194 
0

That was wrong. Thanks for trying, though. 

somehelpplease  Apr 24, 2020
 #2
avatar
0

xxxxxxxxxxxx

 Apr 24, 2020
edited by Guest  Apr 24, 2020
 #4
avatar
0

Do you want each number to be divisible by 2, 5, 10 simultaneously or separately?

Guest Apr 24, 2020
 #5
avatar+194 
0

"or," so seperately.

somehelpplease  Apr 24, 2020
 #6
avatar+658 
+2

Example:

How many integers less than or equal to 20 are divisible by 2? 5? or 10?

 

20/2 = 10

2, 4, 6, 8, 10, 12, 14, 16, 18, 20

 

20/5 = 4

5, 10, 15, 20

 

20/10 = 2

10, 20

 

10 + (4/2)because every 2 numbers there is a even number - 2 = 10

____________________________________________________________

Now apply the same to 10,000

 Apr 24, 2020
edited by AnExtremelyLongName  Apr 24, 2020
 #9
avatar+118673 
+1

For your example question, you have the right answer, but the wrong reason.

 

10+4-2 = 12

 

Because you have counted 10 and 20 twice.

Melody  Apr 25, 2020
 #11
avatar+658 
+1

Thanks! Not gonna edit it because people can learn from my mistake.

AnExtremelyLongName  Apr 27, 2020
 #7
avatar
+1

a=0;b=0;c=0;d=0;p=0; cycle:n=a*1000+b*100+c*10+d;if(n%2==0 or n%5==0 or n%10==0, goto loop, goto next); loop:printn,", ",;p=p+1; next:d++;if(d<10, goto cycle, 0);d=0;c++;if(c<10, goto cycle, 0);d=0;c=0;b++;if(b<10, goto cycle,0);b=0;c=0;d=0;a++;if(a<10, goto cycle,0);print"Total = ",p

 

OUTPUT = 6,000 such integers.

 Apr 24, 2020
 #8
avatar+118673 
+1

10000/2=5000

10000/5=2000

10000/10=1000

 

5000+2000-1000 = 6000

 

Definitely 6000    cheeky

 Apr 25, 2020
 #10
avatar+194 
+1

Thanks for everyone's help! I really appreciate it. I got it. Have a nice day! :D

 Apr 25, 2020

5 Online Users

avatar