Problem with SPOJ GCDEX

Правка en1, от Polyn0mial, 2022-05-31 15:53:35

I was solving this problem. The formula for this problem can be founded here. I've stress tested my code, and found out that this is the smallest test case where my code failed (answer for n <= 225537 are all correct).

Input
Output
Expect

It is obvious that my output is wrong, since $$$answer(n) > answer(n-1)$$$. I have no idea why my code doesn't work.

Code
Теги number theory, gcd

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Polyn0mial 2022-05-31 15:53:35 2044 Initial revision (published)