+0  
 
+1
392
1
avatar

1. a positive two digit integer ab is a multiple of a + b. How many such integers are there? 

2. A, B, C, and D are positive digits such that ABCD + BCD + CD + D =2012. Find A + B + C + D

 Sep 20, 2020
 #1
avatar
0

1 - 10 , 12 , 18 , 20 , 21 , 24 , 27 , 30 , 36 , 40 , 42 , 45 , 48 , 50 , 54 , 60 , 63 , 70 , 72 , 80 , 81 , 84 , 90 , Total =  23 such numbers.

 

2 - a=1;b=0;c=0;d=0;p=0; cycle:n=a*1000+b*100+c*10+d;if(n +(b*100+c*10+d)+ (c*10+d)+d==2012, 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 = 1,468

 Sep 20, 2020

4 Online Users

avatar