import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for (int i = 0; i < n; i++)
{
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int combo = 0;
int max = 0, min = 0;
for (int j = 0; j < a; j++)
min += 300 * (combo++ * 2 + 1);
for (int j = 0; j < b; j++)
min += 100 * (combo++ * 2 + 1);
for (int j = 0; j < c; j++)
min += 50 * (combo++ * 2 + 1);
combo = 0;
for (int j = 0; j < c; j++)
max += 50 * (combo++ * 2 + 1);
for (int j = 0; j < b; j++)
max += 100 * (combo++ * 2 + 1);
for (int j = 0; j < a; j++)
max += 300 * (combo++ * 2 + 1);
System.out.println(min + " " + max);
}
}
}
ZOJ-3712
最新推荐文章于 2017-02-13 17:05:23 发布