

Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
#include <bits/stdc++.h>
using namespace std;
int a,b,x,y;
//hàm tính luỹ thừa
long long mu(int a,int n)
{
long long s=a;
for (int i=2;i<=n;i++)
{
s=s*a;
}
return s;
}
void solve()
{
cin>>a>>x>>b>>y;
cout<<mu(a,x)<<" "<<mu(b,y)<<endl;
if (mu(a,x)<mu(b,y)) cout<<mu(b,y);
else if (mu(a,x)>mu(b,y)) cout<<mu(a,x);
else cout<<"0";
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
solve();
}
Hãy giúp mọi người biết câu trả lời này thế nào?

#include <bits/stdc++.h>
using namespace std;
int main() {
int a,x,b,y;
cin >> a >> x >> b >> y;
cout << pow(a,x) << " " << pow(b,y) << endl;
if (pow(a,x)>pow(b,y)) cout << pow(a,x);
if (pow(a,x)<pow(b,y)) cout << pow(b,y);
if (pow(a,x)==pow(b,y)) cout << 0;
}
Hãy giúp mọi người biết câu trả lời này thế nào?

Bảng tin