题解 | #单组_一维数组#
单组_一维数组
https://www.nowcoder.com/practice/f3a0631c336d42099103c187a9c65e62
#include <iostream> using namespace std; int main() { int N; cin >> N; long int a[N], sum = 0; for(int i = 0; i < N; i++) { cin >> a[i]; sum += a[i]; } cout << sum << endl; return 0; }