URI Online Judge | 1540

Energy Planning

By Normandes Jr, UFU BR Brazil

Timelimit: 1

You are contributing for a summit that will help forecast the growing up of eletrical energy in Brazil, making the eletric power be available for a long time in the future.

To be able do that, you have the following information:

  1. during the year of 2010 the consume average was 104.326 GWh.
  2. In 2013 the consume was 127.755 GWh.

You should calculate the anual growing up rate for many situations and forcasting, you can assume that this growing up is linear. In this case, the rate was 7809.66 GWh per year.


The first input line has an integer number N (1 <= N <= 1000) that is the total test cases.

The following N lines are made by the integers A, B (B > 0), C and D (D > 0) separated by one blank space. The number A is the year, B is the consume of A year. The number C is another year and number D is the consume of B year.


For each test case, it should be printed the growing up rate with only two decimal places, separated by comma and truncated - no rounding.

Sample Input Sample Output

2010 104326 2013 127755