#include /** * @brief Calculate the greatest common divisor (GCD) * * @param a First integer * @param b Second integer * @return greatest common divisor between a and b */ constexpr uint64_t gcd(const uint64_t a, const uint64_t b) noexcept { return a == 0 ? b : gcd(b % a, a); }