R, 29 28 bytes (input ≤170!)
match(scan(),cumprod(1:170))
Try it online!
Input is limited to 170!, which is the largest factorial that can be handled as a floating-point number by R; in any case, at larger values, there is a risk that truncated digits in the internal floating-point encoding will affect the output. Obviously the second issue will be fixed when run on an imaginary 'unlimited-precision' R implementation, but the input limitation will always be there (or, with slight modification, a limitation to ≤999!). So...
R, 38 34 bytes
n=scan();while(n>(T=T*(F=F+1)))n;F
Try it online!
Edit: -4 bytes thanks to tip from Giuseppe
This version is still subject to the precision limitations of the R implementation, but could (in principle) be run with unlimited input.
Edit: Obviously the large increase in program length to achieve the unimplemented ability to run on unlimited input is rather unsatisfying, so...
R, 30 29 bytes
match(n<-scan(),cumprod(1:n))
Try it online!
Only one-byte longer than the input-limited attempt. Unfortunately, on all current R implementations, it is rather slow and is likely to crash with anything but small input values, but - in the words of Osgood Fielding III - 'well, nobody's perfect'
x
andn
are positive integers. As such646077305624121491462330357080396430806673805704796612248389053020040737981389397373513335318926846519441974218777961448245634895440330929720840926954349439434654453860427703550673839109903970520283495061590634864022312082259902655711571689179112428197039756156051147969300077437438615382409042832551650139224687809841080780412598454920634889005911333104355143592477664451230317936640000000000000000000000000000000000000000000000000000000
is a perfectly valid value for n :-) \$\endgroup\$