#include <iostream>
using namespace std;
int main() {
int cnt;
char N;
int sum = 0;
cin >> cnt;
while (cnt-- > 0) {
cin >> N;
sum += (N - '0');
}
cout << sum;
}
'Algorithm ๐ง๐ปโ๐ป > ๋ฐฑ์ค(BOJ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค,c++] 11724๋ฒ - ์ฐ๊ฒฐ ์์์ ๊ฐ์ (0) | 2021.10.31 |
---|---|
[๋ฐฑ์ค,c++] 11722๋ฒ - ๊ฐ์ฅ ๊ธด ๊ฐ์ํ๋ ๋ถ๋ถ ์์ด (0) | 2021.10.31 |
[๋ฐฑ์ค,c++] 11721๋ฒ - ์ด ๊ฐ์ฉ ๋์ด ์ถ๋ ฅํ๊ธฐ (0) | 2021.10.31 |
[๋ฐฑ์ค,c++] 11719๋ฒ - ๊ทธ๋๋ก ์ถ๋ ฅํ๊ธฐ2 (0) | 2021.10.31 |
[๋ฐฑ์ค,c++] 11718๋ฒ - ๊ทธ๋๋ก ์ถ๋ ฅํ๊ธฐ (0) | 2021.10.31 |
[๋ฐฑ์ค,c++] 11659๋ฒ - ๊ตฌ๊ฐ ํฉ ๊ตฌํ๊ธฐ4 (0) | 2021.10.31 |
๋๊ธ