fork download
  1. //Bai 7
  2.  
  3. #include<bits/stdc++.h>
  4. using namespace std;
  5. #define el "\n"
  6. #define ll long long
  7. #define ull unsigned long long
  8. #define se second
  9. #define fi first
  10. #define be begin()
  11. #define en end()
  12. #define Faster cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
  13.  
  14. void Run(int n, ll a[])
  15. {
  16. ll ans = 1;
  17. for(int i = 0; i < n; i++)
  18. {
  19. cin >> a[i];
  20. if(i % 2 == 0) ans *= a[i];
  21. }
  22. cout << ans;
  23. }
  24. int main()
  25. {
  26. Faster;
  27. int n; cin >> n;
  28. ll a[n];
  29. Run(n, a);
  30. return 0;
  31. }
  32.  
  33.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
Standard output is empty