Language: C

#include <stdio.h>
#include <math.h>

long long gcd(long long a, long long b)
{
	long long temp;

	if (a < b)
	{
		temp = b;
		b = a;
		a = temp;
	}

	while (b != 0)
	{
		temp = b;
		b = a % b;
		a = temp;
	}
	return a;
}

long long gongbeishu(long long a, long long b)
{
	return a * b / gcd(a, b);
}

long long shuzugongbeishu(long long a[], int len)
{
	long long temp[len];
	int i;
	for (i = 0; i < len; i++)
	{
		temp[i] = a[i];
	}

	for (i = 1; i < len; i++)
	{
		temp[i] = gongbeishu(temp[i - 1], temp[i]);
		//printf("%d",temp[i]);
	}
	return temp[len - 1];
}

/*

2, 3, 10

30

*/

int main()
{
	int N, i;
	long long cnt = 0, gongbeishu;
	scanf("%d", &N);
	long long A[N];
	for (i = 0; i < N; i++)
	{
		scanf("%lld", &A[i]);
	}

	gongbeishu = shuzugongbeishu(A, N);

	//printf("%ld\n",gongbeishu);

	for (i = 0; i < N; i++)
	{
		cnt += gongbeishu / A[i];
	}

	printf("%lld\n", cnt % (1000000000 + 7));

	return 0;
}




/
#include <stdio.h>
int R = 1, C = 1, H[2000010], N[2000010];
//評価関数（いまはMIN）
int hyouka(int a, int b)
{
	if (C < b)
		return 1;
	if (C < a || b == 0)
		return 0;
	return N[H[a]] < N[H[b]] ? 1 : 0;
}
//挿入関数
void hin(int a)
{
	int i = C++;
	for (N[H[0] = R] = a; hyouka(0, i / 2); i /= 2)
		H[i] = H[i / 2];
	H[i] = R++;
}
//取り出す関数
int hout()
{
	int rt = H[1], i, j = 2, k = H[--C];
	for (i = 1; hyouka(i, C); i = j)
		H[i] = H[j = i * 2 + 1 - hyouka(i * 2, i * 2 + 1)];
	H[j / 2] = k;
	return rt;
}
int mbk(long long a, int n, int m) { return n ? (mbk((a * a) % m, n / 2, m) * (n % 2 ? a : 1)) % m : 1; }
int inv(int a, int m) { return mbk((long long)a, m - 2, m); }
int main()
{
	long long n, i, j, k, NN = 1e6 + 10, M = 1e9 + 7, pr[1010], r = 0, a[100010], b[1010], x, ans = 0;
	char p[1000010] = {1, 1};
	scanf("%lld", &n);
	for (i = 2; i * i < NN; i++)
	{
		if (p[i])
			continue;
		for (j = i * i; j < NN; j += i)
			p[j] = 1;
	}
	for (i = 0; i * i < NN; i++)
	{
		if (p[i])
			continue;
		pr[r++] = i;
	}
	for (i = 0; i < n; i++)
	{
		scanf("%lld", &a[i]);
		x = a[i];
		for (j = 0; j < r; j++)
		{
			for (k = 0; x % pr[j] == 0; k++)
				x /= pr[j];
			if (b[j] < k)
				b[j] = k;
		}
		hin(x);
	}
	x = k = N[hout()];
	for (i = 1; i < n; i++)
	{
		j = N[hout()];
		if (x == j)
			continue;
		k = (k * j) % M;
		x = j;
	}
	for (i = 0; i < r; i++)
	{
		for (j = 0; j < b[i]; j++)
			k = (k * pr[i]) % M;
	}
	//printf("%lld\n",k);
	//for(i=0;i<n;i++)printf("%lld\n",k*inv(a[i],M));
	for (i = 0; i < n; i++)
		ans = (ans + (k * inv(a[i], M) % M)) % M;
	printf("%lld\n", ans);
	return 0;
}
*/

Compiler output:
main.c:82:1: error: expected identifier or '(' before '/' token
   82 | /
      | ^
main.c: In function 'hyouka':
main.c:88:13: error: 'C' undeclared (first use in this function)
   88 |         if (C < b)
      |             ^
main.c:88:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:92:16: error: 'N' undeclared (first use in this function)
   92 |         return N[H[a]] < N[H[b]] ? 1 : 0;
      |                ^
main.c:92:18: error: 'H' undeclared (first use in this function)
   92 |         return N[H[a]] < N[H[b]] ? 1 : 0;
      |                  ^
main.c: In function 'hin':
main.c:97:17: error: 'C' undeclared (first use in this function)
   97 |         int i = C++;
      |                 ^
main.c:98:14: error: 'N' undeclared (first use in this function)
   98 |         for (N[H[0] = R] = a; hyouka(0, i / 2); i /= 2)
      |              ^
main.c:98:16: error: 'H' undeclared (first use in this function)
   98 |         for (N[H[0] = R] = a; hyouka(0, i / 2); i /= 2)
      |                ^
main.c:98:23: error: 'R' undeclared (first use in this function)
   98 |         for (N[H[0] = R] = a; hyouka(0, i / 2); i /= 2)
      |                       ^
main.c: In function 'hout':
main.c:105:18: error: 'H' undeclared (first use in this function)
  105 |         int rt = H[1], i, j = 2, k = H[--C];
      |                  ^
main.c:105:42: error: 'C' undeclared (first use in this function)
  105 |         int rt = H[1], i, j = 2, k = H[--C];
      |                                          ^
main.c: At top level:
main.c:113:5: error: redefinition of 'main'
  113 | int main()
      |     ^~~~
main.c:54:5: note: previous definition of 'main' with type 'int()'
   54 | int main()
      |     ^~~~
main.c: In function 'main':
main.c:144:17: error: 'N' undeclared (first use in this function)
  144 |         x = k = N[hout()];
      |                 ^
main.c: At top level:
main.c:165:2: error: expected identifier or '(' before '/' token
  165 | */
      |  ^