Problem: https://codeforces.net/contest/1459/problem/C
The algorithm is all about performing
Unable to parse markup [type=CF_MATHJAX]
$ gcd computations of large integers. Haskell it seems is too slow for even this!
C++ code passes in ~ 1.3 sec.
Haskell code on the other hand exceeds TL (2 sec). Switching from Integer to Int64 does not help a bit. Disappointing.
Any ideas on optimizing it?