Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: KHOPAN
Problemset: ผลรวมของเลขหลัก
Language: c
Time: 0.002 second
Submitted On: 2025-09-29 15:40:42
#include <stdio.h>
#include <stdint.h>
int main(const int argc, const char* const* const argv) {
uint64_t number;
if(!scanf("%llu", &number)) {
return 1;
}
uint64_t sum = 0;
while(number) {
sum += number % 10;
number /= 10;
}
printf("%llu\n", sum);
return 0;
}