gcd()能背下来最好。
//最大公约数
int gcd(int a, int b)
{
if (b == 0)return a;return gcd(b, a%b);
}
//最小公倍数
int lcm(int a, int b)
{
return (int)((a * b) / gcd(a, b));
}
int main()
{
int a, b, c;cin >> a >> b >> c;cout << lcm(a, lcm(b, c)) << endl;system("pause");return 0;
}