#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(), x.end()
#define pb push_back
#define sz(x) (int)x.size()
#define dbg(x) cerr << #x << " = " << x << '\n';
const int MOD = 1e9 + 7;
const int INF = 1e18;
int modmul (int x, int y){
return ((x % MOD) * (y % MOD)) % MOD;
}
void solve() {
int n;
cin >> n;
int ans = 1;
while(n--){
int x;
cin >> x;
ans = modmul(ans, x);
}
cout << ans;
}
int32_t main() {
ios::sync_with_stdio(0);
cin.tie(0);
int t = 1;
// cin >> t;
while (t--) solve();
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |