2.
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n,a,b;
cin>>n;
a=n%10,n/=10;
b=n%10,n/=10;
cout<<max({a,b,n});
}
3.
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n,a,b;
cin>>n;
a=n%10,n/=10;
b=n%10,n/=10;
cout<<max({a*b+n,a*n+b,b*n+a});
}