Created
July 24, 2019 15:23
-
-
Save glowing713/b7c6d679dede7e57c976d77112945559 to your computer and use it in GitHub Desktop.
백준 15596번 정수 N개의 합
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
using namespace std; | |
long long sum(vector<int> &a) { | |
long long ans = 0; | |
for(vector<int>::iterator itr = a.begin(); itr != a.end(); itr++){ | |
ans += *itr; | |
} | |
return ans; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment