this problem was written by chat gpt by rotary-o

class M{static void Main(){for(int i=1,j,k;i<1e4;){var a=new int[k=10];for(j=i++;j>0;j/=k)a[j%k]++;string s="",t="\n";for(;j++<9;)if(a[j]>1){s+=j;t=j+t;a[j]-=2;j=-1;}for(;j-->0;)k=a[j]>0?k==10?j:i:k;if(k<i)System.Console.Write(k>9?s+t:s+k+t);}}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page