A Problem about Number Theory

Правка en1, от user_wangkaiwei, 2026-07-20 05:12:44

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.

Теги number theory

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский user_wangkaiwei 2026-07-20 05:12:44 402 Initial revision (published)