JavaScript (V8), 96 bytes
a=>{for(i=a>>2;++i<a*4;)/[09]/.test(i)|[...a].map((n,j)=>s+=((i+'')[j]-n)**2,s=0)^s^5||print(i)}
Input is a string, for example, [6, 5, 2]
is inputed as "652"
. Output each answer per line to stdout.
a=>{for(i=a>>2;++i<a*4;)/[09]/.test(i)|[...a].map((n,j)=>s+=((i+'')[j]-n)**2,s=0)^s^5||print(i)}
Input is a string, for example, [6, 5, 2]
is inputed as "652"
. Output each answer per line to stdout.