1 条题解

  • 0
    @ 2023-1-20 20:18:46

    #include <iostream>
    using namespace std;
    int main()
    {
        int n,a[10],d=1;
        cin >> n;
        for(int i=1;i<=n;i++)
        {
            cin >> a[i];
        }
        for(int i=1;i<=999999;i++)
        {
            d=1;
            for(int j=1;j<=n;j++)
            {
                if(i%a[j]!=0)
                {
                    d=0;
                }
            }
            if(d==1)
            {
                cout << i+1;
                break;
            }
        }
    }
    
    • 1

    信息

    ID
    330
    时间
    1000ms
    内存
    16MiB
    难度
    1
    标签
    递交数
    44
    已通过
    34
    上传者