提交时间:2024-01-21 09:19:38
运行 ID: 37465
#include <bits/stdc++.h> using namespace std; int a[100005], b[100005]; int main(){ int n; scanf("%d", &n); for (int i = 1; i <= n; ++ i){ scanf("%d", &a[i]); b[i] = b[i - 1] + a[i]; cout << b[i] << " "; } return 0; }