Răspuns :
COROANA TE ROG!!!
1
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int x;
cin>>x;
//a
cout<<x%10<<' ';
//b
cout<<x/10%10<<' ';
//c
cout<<(int)(x / pow(10, (int)log10(n)))<<' ';
//d
cout<<x%100<<' ';
//e
cout<<(int)(x / pow(10, (int)log10(n)-1))<<' ';
//f
if(x>=100&&x<=999) cout<<x%10<<x/100%10;
else if(x>=1000&&x<=9999) cout<<x%10<<x/100%10;
else if(x>=10000&&x<=99999) cout<<x%10<<x/100%10<<x/1000%10;
else if(x>=100000&&x<=999999) cout<<x%10<<x/100%10<<x/1000%10;
else if(x>=1000000&&x<=9999999) cout<<x%10<<x/100%10<<x/1000%10<<x/10000%10;
else if(x>=10000000&&x<=99999999) cout<<x%10<<x/100%10<<x/1000%10;
else if(x>=100000000&&x<=999999999) cout<<x%10<<x/100%10<<x/1000%10<<x/100000%10;
2
#include<iostream>
using namespace std;
int main(){
int x, y;
cin>>x>>y;
//a
while(x!=y){
if(x>y)
x-=y;
else
y-=x;
}
cout<<x;
//b
while(y!=0) {
int r=x%y;
x=y;
y=r;
}
cout<<x;
//c
int r=x%y;
while(x*y!=0) {
x=y;
y=r;
r=x%y;
}
if(y==1)cout<<"DA";
else cout<<"NU";
3
#include<iostream>
using namespace std;
int main(){
int s=0, X;
cin>>X;
for(int i=1;i<=X;i++) if (X%i==0) s+=i;
if(s==X+1) cout<<"DA";
else cout<<"NU";
}
4
#include<iostream>
using namespace std;
int main(){
int a, b, s=0;
cin>>a>>b;
for(int i=a;i<=b;i++) {
int j;
for(j=1;j<=i;j++) if(i%j==0) s+=j;
if(s==j+1) cout<<j<<' ';
s=0;
}
}