A hard problem from Vietnam Olympiad in Informatics for 9-grader [Part 2]

Revision en1, by bvd, 2017-03-26 19:18:42

17493195_1919527948281479_2748595590774946471_o.jpg

English version:

The first problem is similar to Problem G — Inverse Factorial in 2016 ICPC North American Qualifier Contest; however, there is a twist: if there is no n for the given value n!, you need to output  - 1.

I think there is a solution for this problem, but I can not find it :)

By the way, a gifted 9-grader in Vietnam has no idea about FFT anything similar to that.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English bvd 2017-03-26 19:18:42 647 Initial revision (published)