MCPcopy Create free account
hub / github.com/E869120/math-algorithm-book / main

Function main

codes/cpp/Code_5_07_1.cpp:6–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4long long N, A[200009], Answer = 0;
5
6int main() {
7 // ����
8 cin >> N;
9 for (int i = 1; i <= N; i++) cin >> A[i];
10
11 // ���������߂� �� �����̏o��
12 for (int i = 1; i <= N; i++) Answer += A[i] * (-N + 2LL * i - 1LL);
13 cout << Answer << endl;
14 return 0;
15}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected