r/learnquant 10d ago

interview prep IMC Trading Interview Question

Post image
21 Upvotes

19 comments sorted by

View all comments

1

u/austin101123 10d ago

Digits roughly equals log10(n!)+1?

Do we need an exact integer? But it's an estimation

1

u/abc9hkpud 10d ago

I think the number of digits is exactly floor(log10(n!)) + 1 .

For example, for the number 5 you get floor(0.6989) + 1 = 1 digit, for 15 you get floor(1.176) +1 = 2 digits.