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

HO1014 - Шугаман 5

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

Input

4 оронтой нэг тоо өгөгдөнө.

Output

Цифрүүдийн нийлбэр үржвэрийг нэг нэг мөрөнд хэвлэ.

Example

Input:
3453

Output:
15
180

Нэмсэн:munkhbat
Огноо:2013-01-11
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:Бүгд дараах хэлүүдээс бусад: ASM64 NCSHARP JULIA PYPY3

hide comments
2024-12-09 05:18:49
6-2iig 6-1 copy hiisen 6-1 ichij amidraasai
2024-12-09 05:17:55
amid hun bnu
2024-09-21 10:15:50
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,e,f,g,h;
cin>>a;
d = a%10;
b = a%100;
c = b-d;
c = c/10;
e = a%1000;
e = e-b;
e = e/100;
f = a%10000;
f = f-e;
f = f/1000;
g = d+c+e+f;
h = d*c*e*f;
cout<<g<<endl;
cout<<h<<endl;
}
2024-03-25 06:58:53
.

Last edit: 2024-03-25 06:59:24
2023-10-25 09:20:48
serge gay
2023-10-23 07:45:23
amjilt cyber surgulin 7-1 angin gomo tengis saraanad sn
2023-03-13 11:31:01
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b=1, i, c=0;
scanf("%d" ,&a);
for(i=1; i<=a; i++)
{
b=b*(a%10);
c=c+(a%10);
a=a/10;
}
printf("%d\n%d\n" ,c ,b);
} munji
2023-02-08 05:46:17
ur mom hihi
gshohh
2023-02-08 05:42:13
slay bre
2022-11-09 02:37:05
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,n,s,p;
cin>>n;
a=n/1000;
b=n/100%10;
c=n/10%10;
d=n%10;
s=a+b+c+d;
p=a*b*c*d;
cout<<s<<endl<<p<<endl;
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.