标签:
#include <stdio.h>#include <string.h>#include <algorithm>#include <iostream>using namespace std;//int f[1010]= {0, 1, 1};__int64 lcm(__int64 a,__int64 b) // 最小公倍数{__int64 c = b%a;if(a > b) return lcm(b, a);if(c==0) return b;return lcm(c,a)/c*b;}__int64 gcd(__int64 x, __int64 y) //最大公约数{__int64 m;if(x<y)return gcd(y,x);if(x%y!=0)return gcd(y,x%y);else return y;}
标签:
原文地址:http://www.cnblogs.com/sober-reflection/p/1424dfd0405240e68dd7565f8a3cfca4.html