Editorial didn’t help here [Closed]

Revision en5, by 100_percent, 2024-11-14 18:18:14

Could someone please explain how to solve this problem: Prime Number

It’s from an old contest and I haven’t been able to find a clearer explanation of the solution. Thank you and please do not ignore if you can solve it and explain.

EDIT: After 2 to 3 hours of painstakingly searching for a vivid explanation, I sat down to burst my brains out on the problem. Suffice to say, I am very satisfied and at peace with finding how to obtain the solution and why the solution works by myself after spending quite a lot of time. Below are shots of my notes for the problem. For anyone who needs it.

NB: I gave up on the problem and checked the editorial in reasonable time. I just wasn't satisfied with the explanation. I also found the problem interesting urging me to dig more. If there are any improvements, questions, mistakes or suggestions please comment below.

Solution

image
image

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English 100_percent 2024-11-14 18:18:14 69
en4 English 100_percent 2024-11-14 17:52:12 11
en3 English 100_percent 2024-11-14 17:50:17 878
en2 English 100_percent 2024-11-14 13:59:07 2 Tiny change: 'n[Prime Nunber](http:' -> 'n[Prime Number](http:'
en1 English 100_percent 2024-11-14 11:55:20 310 Initial revision (published)