出题人是大触
给出公式 求最大最小值
#include<iostream>
#include<cstdio>
#include<set>
#include<string>
#include<string.h>
#include<cstring>
#include<vector>
#include<map>
#include<queue>
#include<stack>
#include<cctype>
#include<algorithm>
#include<sstream>
#include<utility>
#define mt(a) memset(a,0,sizeof (a))
#define fl(a,b,c) fill(a,b,c)
#define SWAP(a,b,t) (t=a,a=b,b=t)
#define inf 1000000000+7
using namespace std;
typedef long long ll;
int main()
{
int T;
cin >> T;
while (T--)
{
ll x, y, z;
cin >> x >> y >> z;
ll com = 0,minn=0,maxx=0;
for (com; com < x; com++)
{
maxx += (300 * (com * 2 + 1));
}
for (com; com < x+y; com++)
{
maxx += (100 * (com * 2 + 1));
}
for (com; com < x+y+z; com++)
{
maxx += (50 * (com * 2 + 1));
}
com = 0;
for (com; com < z; com++)
{
minn += (50 * (com * 2 + 1));
}
for (com; com < y+z; com++)
{
minn += (100 * (com * 2 + 1));
}
for (com; com < x + y + z; com++)
{
minn += (300 * (com * 2 + 1));
}
cout << maxx << " " << minn << endl;
}
return 0;
}