rengetsu

Codeforces_479A

Jul 31st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. //Codeforces Round 479A
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a, b, c, max=-1;
  7.     cin >> a >> b >> c;
  8.     if((a+b+c)>max){max=(a+b+c);}
  9.     if((a+b-c)>max){max=(a+b-c);}
  10.     if((a+b*c)>max){max=(a+b*c);}
  11.     if(((a+b)*c)>max){max=((a+b)*c);}
  12.     if((a-b+c)>max){max=(a-b+c);}
  13.     if((a-b-c)>max){max=(a-b-c);}
  14.     if((a-b*c)>max){max=(a-b*c);}
  15.     if(((a-b)*c)>max){max=((a-b)*c);}
  16.     if((a*b+c)>max){max=(a*b+c);}
  17.     if((a*(b+c))>max){max=(a*(b+c));}
  18.     if((a*b-c)>max){max=(a*b-c);}
  19.     if((a*(b-c))>max){max=(a*(b-c));}
  20.     if((a*b*c)>max){max=(a*b*c);}
  21.     cout << max;
  22.     return 0;
  23. }
Add Comment
Please, Sign In to add comment