#include <iostream>
#include <vector>
#include <sstream>
#include <string>
using namespace std;
vector<string>v;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
vector<string>v;
string s; cin >> s;
string stringBuffer;
stringstream ss(s);
while (getline(ss, stringBuffer, ',')) {
v.push_back(stringBuffer);
}
int ans = 0;
for (int i = 0; i < v.size(); i++) {
ans += stoi(v[i]);
}
cout << ans;
}
'Algorithm ๐ง๐ปโ๐ป > ๋ฐฑ์ค(BOJ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค,c++] 10825๋ฒ - ๊ตญ์์ (0) | 2021.10.25 |
---|---|
[๋ฐฑ์ค,c++] 10824๋ฒ - ๋ค ์ (0) | 2021.10.25 |
[๋ฐฑ์ค,c++] 10823๋ฒ - ๋ํ๊ธฐ2 (0) | 2021.10.24 |
[๋ฐฑ์ค,c++] 10820๋ฒ - ๋ฌธ์์ด ๋ถ์ (0) | 2021.10.24 |
[๋ฐฑ์ค,c++] 10819๋ฒ - ์ฐจ์ด๋ฅผ ์ต๋๋ก (0) | 2021.10.24 |
[๋ฐฑ์ค,c++] 10818๋ฒ - ์ต์, ์ต๋ (0) | 2021.10.24 |
๋๊ธ