Advertisement
Promi_38

cf 712A

Jan 23rd, 2021
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     int n, i;
  6.     scanf("%d", &n);
  7.    
  8.     long long a[n];
  9.     for(i = 0; i < n; i++) scanf("%lld", &a[i]);
  10.    
  11.     for(i = 0; i < n - 1; i++) printf("%lld ", a[i] + a[i+1]);
  12.     printf("%lld\n", a[n - 1]);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement