If \(x\%\) of four-digit numbers have a repeated digit (the repeated digits do not need to be adjacent), then what is \(x\)? Express your answer as a decimal to the nearest tenth.

Guest Nov 29, 2019

#1**0 **

a=1;b=0;c=0;d=0;p=0; cycle:if(a==b or a==c or a==d or b==c or b==d or c==d, goto loop, goto next); loop:print a*1000+b*100+c*10+d," ",;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 =4,464 integers - have at least 2 repeated digits out of total of 9,000 integers.

So x =4,464 / 9,000 = 62 / 125 =49.6%

Guest Nov 30, 2019