题目链接:http://codeforces.com/contest/479/problem/A
题意:用加,乘两种操作算出算术式的最大值,可以加括号。。。
思路:直接暴力枚举。。。。
code:
<span style="font-size:18px;">#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
int a,b,c;
while(scanf("%d%d%d",&a,&b,&c)==3)
{
int maxx;
maxx=a+b+c;
maxx=max(maxx,a*b+c);
maxx=max(maxx,a*b*c);
maxx=max(maxx,a*(b+c));
maxx=max(maxx,(a+b)*c);
printf("%d\n",maxx);
}
return 0;
}</span>