沃德田娜,半江瑟瑟半江黛
查看原帖
沃德田娜,半江瑟瑟半江黛
977778
__Harry_Haiyun__楼主2023/8/28 22:28
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int maxn = 1e6+7;
const int MAXN = maxn / 2;
int lcm(int a,int b,int c)
{
	for (int i = max({a,b,c});; i++)
		if (i % a == 0 && i % b == 0 && i % c == 0)
			return i;
}
signed main()
{
 	ios::sync_with_stdio(false);
 	cin.tie(NULL);
 	cout.tie(NULL);
 	int a,b,c;
 	cin >> a >> b >> c;
 	cout << lcm(a,b,c);
 	return 0;
}
2023/8/28 22:28
加载中...