Language: C++

#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\b.txt"
 
#include<vector>
#include<map>
#include<algorithm>
#include <string>
using namespace std;
long long int powint(long long int a, int b) {
	if (b == 0)return 1;
	if (b == 1)return a;
	else {
		long long int ans = 1;
		long long int c = powint(a, b / 2);
		ans *= c*c;
		ans *= (b % 2) ? a : 1;
		return ans;
	}

}
long long int gcd(long long int l, long long int r) {
	if (l > r)return gcd(r, l);
	else {
		if (r%l) {
			return gcd(l, r%l);

		}
		else {
			return l;
		}
	}
}

map<long long int, int>soinnsuu(long long int a) {
	map<long long int, int>ans;
	for (long long i = 2; i*i <= a; ++i) {
		while (a%i == 0) {
			ans[i]++;
			a /= i;
		}
	}
	if (a != 1)ans[a]++;


	return ans;
}
vector<int>primes;
void hurui(const int amax) {
	static bool flag = false;
	if (flag)return;
	vector<int>sos;
	sos = vector<int>(amax + 1, true);
	sos[0] = false; sos[1] = false;
	for (int i = 2; i <= amax; ++i) {
		if (sos[i]) {
			for (int j = 2 * i; j <= amax; j += i)sos[j] = false;
		}
	}
	for (int i = 0; i <= amax; ++i) {
		if (sos[i]) {
			primes.push_back(i);
		}
	}
	flag = true;
}
map<long long int, int>soinnsuu(long long int a) {
	hurui(1e8);
	map<long long int, int>ans;
	for (auto km : kmp) {
		int i = km.first;
		if (i> a)break;
		while (a%i == 0) {
			ans[i]++;
			a /= i;
		}
	}
	if (a != 1)ans[a]++;
	return ans;
}

bool isso(long long int a) {
	if (a == 1 || a == 0)return false;
	for (long long int i = 2; i*i <= a; ++i) {
		if ((a%i)) {
		}
		else {
			return false;
		}
	}
	return true;
}
vector<long long int> divisor(map<long long int, int> s) {
	vector<long long int> res;
	int num = 1;
	for (auto it = s.begin(); it != s.end(); ++it) {
		num *= (*it).second + 1;
	}
	for (int i = 0; i < num; ++i) {
		int bs = i;
		long long int p = 1;
		for (auto it = s.begin(); it != s.end(); ++it) {
			int a = bs % ((*it).second + 1);
			p *= powint((*it).first, a);
			bs /= ((*it).second + 1);
		}
		res.push_back(p);
	}
	return res;
}
vector<long long int> divisor(long long int n) {
return divisor(soinnsuu(a));
//	vector<long long int> res;
//	for (long long int i = 1; i * i <= n; ++i) {
//		if (n % i == 0) {
//			res.push_back(i);
//			if (i * i != n) res.push_back(n / i);
//		}
//	}
//	sort(begin(res), end(res));
//	return res;
}


long long int powmod(long long int a, long long int b, const int mod) {
	assert(b >= 0);
	if (b == 0)return 1;
	if (b == 1)return a;
	long long int ans = 1;
	long long int aa = powmod(a, b / 2, mod);
	ans *= aa*aa;
	ans %= mod;
	if (b % 2)ans *= a;
	ans %= mod;
	return ans;
}



int main() {
	int N; cin >> N;
	long long int a = 0;
	while (N--) {
		long long int b; cin >> b;
		a = a*b / (gcd(a, b));
	}
	cout << a << endl;
	return 0;
}

Compiler output:
a.cc:75:24: error: redefinition of 'std::map<long long int, int> soinnsuu(long long int)'
   75 | map<long long int, int>soinnsuu(long long int a) {
      |                        ^~~~~~~~
a.cc:43:24: note: 'std::map<long long int, int> soinnsuu(long long int)' previously defined here
   43 | map<long long int, int>soinnsuu(long long int a) {
      |                        ^~~~~~~~
a.cc: In function 'std::map<long long int, int> soinnsuu(long long int)':
a.cc:78:24: error: 'kmp' was not declared in this scope; did you mean 'km'?
   78 |         for (auto km : kmp) {
      |                        ^~~
      |                        km
a.cc: In function 'std::vector<long long int> divisor(long long int)':
a.cc:120:25: error: 'a' was not declared in this scope
  120 | return divisor(soinnsuu(a));
      |                         ^