#include<bits/stdc++.h>
using namespace std;
void check(int a,int b,int c)
{
int p,q,r,s,t,u;
p=a*b+c;
q=a+b*c;
r=(a+b)*c;
s=a*b*c;
t=a*(b+c);
u=a+b+c;
cout<<max(p,max(q,max(r,max(s,max(t,u)))));
}
int main()
{
int a,b,c;
cin>>a>>b>>c;
check(a,b,c);
return 0;
}
#include < bits / stdc ++. h > using namespace std ; int main () { string str ; getline ( cin , str ); int index = str . find ( "WUB" ); int count = 0 ; while ( index !=- 1 ) { str . replace ( index , 3 , " " ); //str.erase(str.begin()+index,str.begin()+index+3); index = str . find ( "WUB" ); } cout << str ; return 0 ; }
Comments
Post a Comment