user_wangkaiwei's blog

By user_wangkaiwei, history, 3 months ago, In English

Description:

You have a number $$$n$$$, and the smallest prime factor of $$$n$$$ is $$$p$$$. Turning $$$n$$$ into $$$\frac{n+p}{2}$$$ is called an operation.

You should do this until $$$n$$$ is prime.

Find the number of times the operation can be performed.

No limits.Could you find the lowest complexity of this problem?It's unnecessary to consider the complexity of input and output.

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it