Submission #546303

#TimeUsernameProblemLanguageResultExecution timeMemory
546303AJ00Calvinball championship (CEOI15_teams)C++14
10 / 100
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; #define int long long const int INF = 1000007; signed main() { ios_base::sync_with_stdio(false); cin.tie(0); int t=1,n,a,ans; // cin >> t; while (t--){ cin >> n; ans = 0; for (int i = 0; i < n; i++){ cin >> a; a--; // cout << (a*()) ans = ((ans+(((a)*(n-i))%INF))%INF); } ans = ((ans+1)%INF); cout << ans << "\n"; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...