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