Chef recently opened a big e-commerce website where her recipes can be bought online. It's Chef's birthday month and so she has decided to organize a big sale in which grand discounts will be provided.
In this sale, suppose a recipe should have a discount of x percent and its original price (before the sale) is p. Statistics says that when people see a discount offered over a product, they are more likely to buy it. Therefore, Chef decides to first increase the price of this recipe by x% (from p) and then offer a discount of x% to people.
Chef has a total of N types of recipes. For each i (1 ≤ i ≤ N), the number of recipes of this type available for sale is quantityi, the unit price (of one recipe of this type, before the x% increase) is pricei and the discount offered on each recipe of this type (the value of x) is discounti.
Please help Chef find the total loss incurred due to this sale, if all the recipes are sold out.

-----Input-----
- The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
- The first line of each test case contains a single integer N denoting the number of recipe types.
- N lines follow. The i-th of these lines contains three space-separated integers pricei, quantityi and discounti describing the i-th recipe type.

-----Output-----
For each test case, print a single line containing one real number — the total amount of money lost. Your answer will be considered correct if it has an absolute error less than 10-2.

-----Constraints-----
- 1 ≤ T ≤ 10
- 1 ≤ N ≤ 105
- 1 ≤ pricei, quantityi ≤ 100 for each valid i
- 0 ≤ discounti ≤ 100 for each valid i

-----Subtasks-----
Subtask #1 (30 points): 1 ≤ N ≤ 100
Subtask #2 (70 points): original constraints

-----Example-----
Input:

2
2
100 5 10
100 1 50
3
10 10 0
79 79 79
100 1 100

Output:

30.000000000
3995.0081000

-----Explanation-----
Example case 1: There are two recipes.
There are 5 recipes of the first type, each of them has a price of 100 and there is a 10% discount provided on it. Therefore, Chef first increases the price of each recipe by 10%, from 100 to 110. After that, she decreases the price by 10%, which makes the final price 99. The amount of money lost for each unit is 1, thus losing 5 for recipes of the first type.
There is only one recipe of the second type, with price 100 and a 50% discount. Therefore, Chef increases the price of the recipe by 50% from 100 to 150 and after that, she decreases its price by 50% to make its final price 75. She loses 25 for this recipe.
Overall, the amount of money Chef loses is 30.

Difficulty: EASY

Solutions:
t = int(input())
while t:
	n = int(input())
	s = 0
	while n:
		(p, q, d) = map(int, input().split())
		x = p * d / 100 + p
		y = x - x * d / 100
		s += abs(p - y) * q
		n -= 1
	a = len(str(s)) - 1
	print(str(s) + '0' * (11 - a))
	t -= 1


for _ in range(int(input())):
	n = int(input())
	total = 0
	for i in range(n):
		(p, q, d) = map(int, input().split())
		temp = p + p * d / 100
		price = temp - temp * d / 100
		total += q * (p - price)
	total_string = str(total)
	ans = total_string + '0' * (12 - len(total_string))
	print(ans)


for i in range(int(input())):
	n = int(input())
	z = 0.0
	for i in range(n):
		(x, q, d) = map(int, input().split())
		a = d / 100 * x
		b = x + a
		c = d / 100 * b
		m = b - c
		e = x - m
		z += e * q
	s = str(z)
	c = 0
	for i in s:
		if i == '.':
			break
		else:
			c += 1
	y = len(s)
	u = 12 - y
	s += u * '0'
	print(s)