Submission #713505

# Submission time Handle Problem Language Result Execution time Memory
713505 2023-03-22T10:29:31 Z ALTAKEXE Prosjek (COCI14_prosjek) C++14
50 / 50
2 ms 212 KB
#include<bits/stdc++.h>
using namespace std;
int main(){
  long long int n,t=0,s=0;
  cin>>n;
  while(n--){
  long long int b;
    cin>>b;
    int a=b*(t+1)-s;
    if(t>0) cout<<" "<<a;
    else cout<<a;
    t++;
    s+=a;
  }
  return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 2 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct