Untitled
user_5668965
c_cpp
9 months ago
243 B
13
Indexable
#include<iostream> using namespace std; int main(){ int t; cin>>t; while(t--){ int n; cin>>n; int S=1000; cout<<S<<" "; for(int i=2;i<=n;i++){ int x; cin>>x; S+=x; cout<<S<<" "; } cout<<"\n"; } }
Editor is loading...
Leave a Comment