+0  
 
0
83
1
avatar

Of all 6-digit integers, how many have the property that the sum of the first 3 digits is equal to the sum of the last 3 digits and that are multiples of 10,007? Thank you for help.

 Nov 29, 2019
 #1
avatar
0

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

 

150105  180126  300210  330231  360252  390273  450315  480336  600420  630441  660462  690483  720504  750525  780546  870609  900630  930651  960672  990693  Total =  20 - such integers.

 Nov 30, 2019

20 Online Users

avatar
avatar