#include uint64_t gcdivis(uint64_t, uint64_t); uint64_t lcmult(uint64_t, uint64_t); uint64_t gcdivis(uint64_t a, uint64_t b) { if (!(a | b)) return 1; if (!b) return a; if (a) { while (a != b) if (a < b) b -= a; else a -= b; } return b; } uint64_t lcmult(uint64_t a, uint64_t b) { return a * b / gcdivis(a, b); }