#include <iostream>
using namespace std;
int main()
{
    int n, i;
    int a[100];
    while (cin >> n)
    {
        int max;
        cin >> a[0];
        max = a[0];
        for (i = 1; i<n; i++)
        {
            cin >> a[i];
            if (a[i]>max)
                max = a[i];
        }
        int k = 0, j;
        for (j = max;; j++)//2 5 7 j=7;
        {
            for (i = 0; i<n; i++)
            {
                if (j%a[i] != 0)
                    break;
            }
            if (i == n)// j%a[i]==0
                break;
        }
        cout << j << endl;

    }
    return 0;
}

 

相关文章:

  • 2021-11-23
  • 2022-12-23
  • 2022-02-23
  • 2021-09-21
  • 2021-10-31
  • 2021-09-08
  • 2022-12-23
猜你喜欢
  • 2021-11-18
  • 2022-12-23
  • 2021-08-28
  • 2022-03-03
  • 2021-12-26
  • 2022-12-23
相关资源
相似解决方案