#include using namespace std; #ifndef ONLINE_JUDGE #include "debug.cpp" #else #define debug(...) #define debugArr(...) #endif #define pb push_back #define ar array #define ll long long #define ld long double #define printvec(vec) {for(ll i=0;i 0) { if (b & 1) res = res * a % m; a = a * a % m; b >>= 1; } return res; } void solve() { int n; cin >> n; vector v(n+1); vector prod(n+1); prod[0] = 1; for(int i=1;i<=n;i++){ cin >> v[i]; prod[i] = (v[i]*prod[i-1])%MOD; } ll ans = prod[n]; for(int i=1;i> tc; for (int t = 1; t <= tc; t++) { // cout << "Case #" << t << ": "; solve(); } cerr<<"Time: "<<1000*((double)clock())/(double)CLOCKS_PER_SEC<<" ms\n"; }