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