Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Nuttykub

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-09-30 23:18:06

#include <iostream>
using namespace std;
int main(){
    string s;
    cin >>s;
    long long total = 0;
    for (int i = 0;i < s.length();i++){
        total+=s[i]-'0';
    }
    cout << total;
}