Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Saizon
Problemset: ผลรวมของเลขหลัก
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-04 19:54:07
#include<iostream>
using namespace std;
int main(){
ios::sync_with_stdio(0); cin.tie(0);
long long int n,s = 0;
cin >> n;
while(n > 0){
s += n % 10;
n = n / 10;
}
cout << s;
}