Submission #560387

# Submission time Handle Problem Language Result Execution time Memory
560387 2022-05-11T10:45:03 Z Trisanu_Das Prosjek (COCI14_prosjek) C++17
0 / 50
1 ms 340 KB
#include <bits/stdc++.h>
using namespace std;

int main(){
  int n; cin >> n;
  int a[n]; cin >> a[0];
  for(int i = 1; i < n; i++){
    int x; cin >> x;
    a[i] = (i + 1) * x - a[i - 1];
  }
  for(int i = 0; i < n; i++) cout << a[i] << ' ';
  cout << '\n';
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Incorrect 1 ms 212 KB Output isn't correct
4 Halted 0 ms 0 KB -