Polynomial calculation of N! modulo M

Правка en1, от blyat, 2019-08-03 19:36:56

Hello, Codeforces! Today I've faced the following problem: is it possible to calculate N! modulo M (M is prime) in polynomial (relative to length of M) time? I thought it would be pretty popular problem, but I couldn't google anything useful. Does anybody know such algorithm or proofs that it does not exist?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский blyat 2019-08-03 19:36:56 348 Initial revision for English translation
ru2 Русский blyat 2019-08-03 19:36:07 12 Мелкая правка: 'oofs that such algorithm does not ' -> 'oofs that it does not '
ru1 Русский blyat 2019-08-03 19:35:36 360 Первая редакция (опубликовано)