+0  
 
0
30
2
avatar

To enter her secret lab, SuperMathHeroine must punch in a $7$-digit code, where each digit can be from $0$ to $9.$ Unfortunately, SuperMathHeroine has forgotten her code. She only remembers that the product of the digits in her code is $10000.$ How many different codes could there be? 

 Apr 22, 2020
 #1
avatar
+1

a=1;b=1;c=1;d=1;e=1;f=1;g=1;p=0; cycle:n=a*1000000+b*100000+c*10000+d*1000+e*100+f*10+g; if(a*b*c*d*e*f*g==10000, goto loop, goto next);loop:printn," ",;p=p+1; next:g++;if(g<10, goto cycle, 0);g=0;f++;if(f<10, goto cycle, 0);g=0;f=0;e++;if(e<10, goto cycle,0);g=0;f=0;e=0;d++;if(d<10, goto cycle,0);g=0;f=0;e=0;d=0;c++;if(c<10, goto cycle,0);g=0;f=0;e=0;d=0;c=0;b++;if(b<10, goto cycle,0);g=0;f=0;e=0;d=0;c=0;b=0;a++;if(a<10, goto cycle,0);print"Total = ",p

 

OUTPUT = 420 such codes

 Apr 22, 2020
 #2
avatar
0

1, 2, 5, 5, 5, 5, 8 =7!/4!      =210 permutations
2, 2, 4, 5, 5, 5, 5 =7!/4!.2! =105 permutations
1, 4, 4, 5, 5, 5, 5 =7!/4!.2! =105 permutations
                             TOTAL= 420 - codes possible

 Apr 22, 2020

26 Online Users

avatar
avatar
avatar
avatar