import java.io.IOException;
import java.util.*;

public class Main
{
	public static void main (String[] args) throws IOException
	{
		// Enter your code here
		// Compile in terminal:> javac main.java
		// Execute in terminal:> java main
		Scanner sc = new Scanner(System.in);
		sc.useLocale(Locale.US);

		int N, i;
		double v1, v2, v3, soma = 0;
		N = sc.nextInt();
		double[] m = new double[N];
		
		for (i = 0; i < N; i++)
		{
			v1 = sc.nextDouble(); v2 = sc.nextDouble(); v3 = sc.nextDouble();
			soma = (v1*2)+(v2*3)+(v3*5);
			m[i] = soma / 10;
			soma = 0;
		}
		
		for (double x : m) System.out.printf("%.1f\n",x);
	}
}
