Submission #51547

# Submission time Handle Problem Language Result Execution time Memory
51547 2018-06-18T12:30:02 Z tranxuanbach Prosjek (COCI14_prosjek) C++17
50 / 50
3 ms 700 KB
#include<bits/stdc++.h>
#define int long long
using namespace std;

signed main(){
    int n;
    cin >> n;
    int a[n + 1], b[n + 1];
    b[0] = 0;
    for (int i = 1; i <= n; i++){
        cin >> a[i];
        b[i] = a[i] * i;
        cout << b[i] - b[i - 1] << " ";
    }
}
# Verdict Execution time Memory Grader output
1 Correct 3 ms 504 KB Output is correct
2 Correct 3 ms 504 KB Output is correct
3 Correct 3 ms 544 KB Output is correct
4 Correct 2 ms 544 KB Output is correct
5 Correct 2 ms 584 KB Output is correct
6 Correct 3 ms 640 KB Output is correct
7 Correct 3 ms 700 KB Output is correct
8 Correct 3 ms 700 KB Output is correct
9 Correct 2 ms 700 KB Output is correct
10 Correct 2 ms 700 KB Output is correct