#include <bits/stdc++.h>
using namespace std;
// 计算数组元素之和的函数
给定一个整数数组 nums ,求解数组的和。
输入共两行。
第一行为两个个整数n,代表数组nums的长度
第二行为n个整数nums0,nums1,...,numsn−1
一个整数,代表数组的和
输入
4
2 7 11 15
输出
35
输入
3
3 2 4
输出
9
Scan the QR code below with WeChat to sign in
First-time scan will create your account automatically
请使用微信扫描下方二维码完成注册