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
2022-04-05 08:45:08
nclude <iostream>
using name space std;
int main ()
{ //doosho guulge














































ich chi





















































































































































































gol ni oilgoj huulyoo
































































































za huulooonclude <iostream>
using name space std;
int main ()
{ //doosho guulge














































ich chi





















































































































































































gol ni oilgoj huulyoo
































































































za huulooonclude <iostream>
using name space std;
int main ()
{ //doosho guulge














































ich chi





















































































































































































gol ni oilgoj huulyoo
































































































za huulooonclude <iostream>
using name space std;
int main ()
{ //doosho guulge














































ich chi





















































































































































































gol ni oilgoj huulyoo
































































































za huulooo
2022-03-29 07:21:37
#include <bits/stdc++.h>
main(){
int n,s=0;
scanf("%d",&n);
while(n>0){
s+=n%10;
n/=10;
}
printf("%d",s);
}
2022-03-29 02:14:54
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,a,s;
cin>>n;
a=0;
while(n>0){
s=n%10;
a=a+s;
n=n/10;
}
cout<<a;
}
2022-03-15 07:15:36
suguudaa copy copy
#include <iostream>
#include <sstream>
#include <string>
#include <cstdlib>
#include <cmath>
using namespace std;

int main()
{
int n,s,a;
cin>>n;
while(n>0)
{
a=n%10;
n=n/10;
s=s+a;
cout<<"noogdvor"<<a<<endl;
cout<<"uldegdel"<<n<<endl;
}
cout<<s;
}
2021-04-15 10:35:24
ok
2019-12-19 14:50:47
#include "pch.h"
#include <iostream>
using namespace std;
int main()
{
int a;
cin >> a;
int g = 0;
int h;
while (a > 0)
{
h = (a % 10);
g = (g + h);
a = (a / 10);
}
cout << g << endl;
return 0;
}// Ez
2019-12-17 08:52:33
#include<iostream>
using namespace std;
int a,n,k=0,l;
int main()
{
cin>>a;
while(a>0)
{
n=a%10;
k=k+n;
a=a/10;
}
cout<<k;
}
_I'm Jack_
2019-12-10 08:18:50
#include <bits/stdc++.h>

main(){
int n,s=0;
scanf("%d",&n);
while(n>0){
s+=n%10;
n/=10;
}
printf("%d",s);
}
2019-12-10 08:18:10
#include <bits/stdc++.h>
main(){
int n,s=0;
scanf("%d",&n);
while(n>0){
s+=n%10;
n/=10;
}
printf("%d",s);
}

2019-12-05 08:21:30
LOL
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.