#include #define num 0 #define den 1 int main(void) { long src[] = {55, 77, 13, 11, 546, 195, 11, 39, 13, 65, 1, 13, 0, 0}; long *f = src, acc = 131625; // x^4 y^3 mul while(f[den]) if(acc % f[den]) f += 2; else acc = acc * f[num] / f[den], f = src; printf("%ld\n", acc); // r^12 return 0; }