Submission #1042227

# Submission time Handle Problem Language Result Execution time Memory
1042227 2024-08-02T16:58:25 Z biserailieva Prosjek (COCI14_prosjek) C++14
50 / 50
0 ms 604 KB
#include <iostream>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int A[n+1];
    for(int i=1;i<n+1;i++)
    {
        cin>>A[i];
    }
    int B[n];
    int zbir=0;
    for(int i=1;i<n+1;i++)
    {
        B[i]=i*A[i]-zbir;
        zbir+=B[i];
        cout<<B[i]<<' ';
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 352 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 604 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct