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.|

RGB7010 - 3 оронтой тоо

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

Input

3 оронтой эерэг тоо өгөгдөнө.

Output

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

Example

Input:
123
Output:
6

Нэмсэн:Bataa
Огноо:2011-05-10
Хугацааны хязгаарлалт: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
2024-04-17 09:48:16
#include<bits/stdc++.h>
using namespace std;
int main(){
long a, b;
cin>>a;
b=(a/100)+(a/10%10)+(a%10%10);
cout<<b;
}
2024-04-15 04:25:29
#include <iostream>
using namespace std;

int main()
{
int too,a,b,c,hairu;
cin >> too;
a = too % 10;
b = too / 10 % 10;
c = too / 100;
hairu=a + b + c;
cout<<hairu;
return 0;
}
anir
2024-03-07 03:03:19
#include <iostream>
#include <sstream>
#include <string>
#include <cstdlib>
#include <cmath>

using namespace std;

// Headers
string toString (double);
int toInt (string);
double toDouble (string);

int main() {
int a, b, c, f;

cin >> a;
b = (int) (a / 100);
f = a % 10;
c = a / 10 % 10;
cout << b+c+f << endl;

return 0;
}

// The following implements type conversion functions.
string toString (double value) { //int also
stringstream temp;
temp << value;
return temp.str();
}

int toInt (string text) {
return atoi(text.c_str());
}

double toDouble (string text) {
return atof(text.c_str());
}
anir
2024-02-26 03:05:16


Last edit: 2024-02-26 03:05:37
2024-02-23 06:29:55
shokolad gudrnga hiij bnshd gal uu
2024-02-04 09:56:54
#include <stdio.h>

int main() {
int number, hundredsDigit, tensDigit, onesDigit, product;

// Input the three-digit number
do {
scanf("%d", &number);
} while (number < 100 || number > 999);

hundredsDigit = number / 100;
tensDigit = (number / 10) % 10;
onesDigit = number % 10;

product = hundredsDigit * tensDigit * onesDigit;

// Output the result
printf("%d\n", product);

return 0;
}
2024-01-17 03:53:41
#include <stdio.h>

int main() {
int a, b, c, d, e, result;
scanf("%d", &a);
c = a / 100;
b = a % 10;
d = a / 10 % 10;

result = c + b + d;
printf("%d", result);
}
2023-12-30 10:57:22
brhs is yashka
2023-12-30 10:27:47
unu is bitch


2023-12-26 09:03:00
niagha
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.