Vampire number: Difference between revisions

→‎{{header|PARI/GP}}: flagged as having some lines too long (overlay concatenated statements), hard to comprehend.
m (→‎{{header|C++}}: added more details to the flag (error) message.)
(→‎{{header|PARI/GP}}: flagged as having some lines too long (overlay concatenated statements), hard to comprehend.)
Line 2,176:
 
=={{header|PARI/GP}}==
 
{{Lines too long|PARI/GP}}
 
<lang parigp>fang(n)=my(v=digits(n),u=List());if(#v%2,return([]));fordiv(n,d,if(#Str(d)==#v/2 && #Str(n/d)==#v/2 && vecsort(v)==vecsort(concat(digits(d),digits(n/d))) && (d%10 || (n/d)%10), if(d^2>n,return(Vec(u))); listput(u, d))); Vec(u)
k=25;forstep(d=4,6,2,for(n=10^(d-1),10^d-1,f=fang(n); for(i=1,#f,print(n" "f[i]" "n/f[i]); if(i==#f && k--==0,return))))