Revision en1, by some_random_handle, 2015-06-14 08:48:45

Problem : http://acm.timus.ru/problem.aspx?space=1&num=1673

Through Discussion forum I found that it can be solved using Euler Totient Function. I have tried for 24 hours but couldn't understand the reason behind using Euler Totient function for this problem.

I feel glad if someone can explain me with the approach to the problem.

Thanks in advance.

Tags c++, algorithms, timus

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English some_random_handle 2015-06-14 08:48:45 437 Initial revision (published)