Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: NovemNotes

Problemset: ผลรวมของเลขหลัก

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-14 21:54:53

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    int n=0;
    string s;cin >> s;
    for(auto &x:s){
        n+=(x-'0');
    }
    cout << n << "\n";
    return 0;
}