#include <iostream>
#include <string>
using namespace std;

int main()
{
    int cnt = 0;
    string num;
    int sum = 0;
    int tmp = 0;
    cin >> cnt;
    cin >> num;
    
    for(int i = 0; i < cnt; i++)
        sum += num[i] -'0';
    cout << sum;
    return 0;
}

카테고리:

업데이트:

댓글남기기