2 solutions

  • 1
    @ 2026-6-20 15:38:32
    #include <bits/stdc++.h>
    using namespace std;
    int main(){//此
        int n;
        cin>>n;
        int cnt=1;//为
        for(int i=0;i<n;i++){
            int x;//水
            cin>>x;
            cnt*= x;//印
            if(cnt>1000000){
                cout<<">1000000"<<endl;
                return 0;
            }
        }
        cout<<cnt<<endl;
        return 0;
    }
    

    Information

    ID
    36
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    6
    Tags
    # Submissions
    38
    Accepted
    14
    Uploaded By