Submission
Status:
PPPPPPP---
Subtask/Task Score:
70/100
Score: 70
User: rosterrester
Problemset: ผลรวมของเลขหลัก
Language: cpp
Time: 0.003 second
Submitted On: 2026-05-03 17:54:14
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int ans = 0;
for(int i = 1; i <= 12; i++){
ans += n % 10;
n = n / 10;
}
cout << ans << "\n";
}