Number Theory Problem from UVA (UVA 11774 — Doom’s Day)

Правка en1, от Tobby_And_Friends, 2017-01-11 15:47:41

Link: https://uva.onlinejudge.org/external/117/11774.pdf

I understand that the for n == m answer is 2. But I can't figure out the solution when n != m. I mean I basically do not understand the theory behind the solution (apart from trying out for small test cases). Any help is really appreciated.

Теги number theory, uva

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Tobby_And_Friends 2017-01-11 15:47:41 355 Initial revision (published)