Submission #339041

# Submission time Handle Problem Language Result Execution time Memory
339041 2020-12-24T13:04:57 Z ammar2000 Prosjek (COCI14_prosjek) C++17
50 / 50
1 ms 364 KB
#include <bits/stdc++.h>

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