Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7302 - Цифрүүдийн нийлбэр

Өгөгдсөн тооны цифрүүдийн нийлбэрийг ол.

Input

Натурал тоо өгөгдөнө.

Output

Цифрүүдийн нийлбэр

Example

Input:
234

Output:
9

Нэмсэн:Bataa
Огноо:2013-01-09
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2023-11-30 03:46:01
<++>
2023-11-30 03:45:35
ymgudeeeeeeeee ^.^

2023-11-30 03:44:58
hha
2023-10-16 12:32:08
kys

Last edit: 2023-10-16 12:35:08
2023-10-05 15:53:37
int n, t, sum = 0, remainder;
cin>>n;
t=n;
while (t != 0)
{
remainder=t%10;
sum=sum+remainder;
t=t/10;
}
cout<<sum;
2023-09-06 12:14:52
fogu
2023-04-20 04:22:55
fuck you

2023-03-17 05:40:56
#include <bits/stdc++.h>
int a,b,c,s,x,n;
int main()
{
scanf("%d",&n);
s=0;
while(n>0) {
x=n%10;
s=s+x;
n=n/10;
}
printf("%d",s);
return 0;
}//huul suguuda
2023-03-09 15:07:24
yuuuuuuuuuuuuuueeeeeeeeeeetsgaaaaaaaaaaaaanaaaaaaaaaaaa
2023-02-17 05:31:48
#include<stdio.h>
main()
{
int n, i=n, a, s=0;
scanf("%d",&n);
for(i=n; i>0; i=i/10)
{
a=i%10;
s=s+a;
}
printf("%d",s);
}
bymbahuud
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.