Submission #932061

# Submission time Handle Problem Language Result Execution time Memory
932061 2024-02-22T21:30:39 Z gokusan Prosjek (COCI14_prosjek) C++17
50 / 50
1 ms 360 KB
#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n;
    int sum=0;
    cin >> n;
    int b[100];
      for (int i = 0; i <n; ++i) {
        cin >> b[i];
    }
    int a[100];
    a[0]=b[0];
    for (int i =0; i < n; ++i) {
        a[i]= b[i]*(i+1)-sum;
        sum=sum+a[i];
        cout << a[i] << " ";
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 360 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 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 1 ms 348 KB Output is correct