Submission #9838

#TimeUsernameProblemLanguageResultExecution timeMemory
9838effservUniting (kriii2_U)C++98
1 / 4
12 ms1088 KiB
#include <cstdio> using namespace std; typedef long long ll; int main() { int N; scanf("%d", &N); ll a; scanf("%lld", &a); ll A = (ll)a; ll C = 0; for (int i = 0; i < N - 1; i++) { scanf("%lld", &a); C += A*a; A += a; } printf("%lld\n0", C); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...