fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int b=1,i,a,n;
  7. cin>>n;
  8. for(i=1;i<=n;i++){
  9. cin>>a;
  10. b=b*a;
  11. // cout<<a<<" ";
  12. // if(b>1000000)
  13. }
  14. if(b<=1000000) cout<<b;
  15. else cout<<">1000000";
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5268KB
stdin
5
100
100
100
100
100







stdout
>1000000