The factoring problem:
Factor $n=pq$ given only $n$ where $p$ and $q$ are primes and $0<p<\sqrt{n}<q<n$
I found that $$\gcd(n, \lfloor\sqrt{n}\rfloor!) = p$$
Would this be considered a solution to the factoring problem? I have only tested it for small semiprimes e.g. $21=3*7$
$$\gcd(21, \lfloor\sqrt{21}\rfloor!)=\gcd(21,24) =3$$ but see no reason why it wouldn't work for all semiprimes. I know that calculating $\lfloor\sqrt{n}\rfloor!$ for large RSA numbers would be a computational nightmare, but just want to know if this "solution" works every time the above conditions are met.
Thanks and Happy $\pi$ Day 2014!