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

HO1020 - Шугаман 11

Өгсөн 5 оронтой тооны цифрүүдийн квадратуудын нийлбэрийг ол.

Input

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

Output

Үр дүнг хэвлэ.

Example

Input:
12345

Output:
55

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

hide comments
2022-10-26 04:09:32
#include<bits/stdc++.h>
using namespace std;
int main (){
int x, s, z, p, i, a, b, c, d, e, f, g;
cin>>x;
z=x/10000;
p=x/1000%10;
a=x/100%10;
i=x/10%10;
s=x%10;
b=z*z;
c=p*p;
d=a*a;
e=i*i;
f=s*s;
g=b+c+d+e+f;
cout<<g<<endl;
}
2022-10-20 08:12:12
huulhaa boli tenguudee
2022-10-20 07:30:03
#include<bits/stdc++.h>
using namespace std;
int main (){
int x, s, z, p, i, a, b, c, d, e, f, g;
cin>>x;
z=x/10000;
p=x/1000%10;
a=x/100%10;
i=x/10%10;
s=x%10;
b=z*z;
c=p*p;
d=a*a;
e=i*i;
f=s*s;
g=b+c+d+e+f;
cout<<g<<endl;
}
2022-09-20 06:54:03


Last edit: 2022-09-26 06:54:32
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.