AP3  AP  Complete The Series v2
After solving "AP  Complete The Series (easy)" very fast, Lucifer decided to make it little more interesting.
He said
He will be give you the 3rd term , 4th last term and the sum of the AP series. You need print length of the series & the series.
Input
First line will contain a number indicating the number of test cases.
Each of the following t lines will have 3 number '3term' ,'4Lastterm' and 'sum'
3term  is the 3rd term in the series and
4Lastterm  is the 4th last term in the series and
sum  is the sum of the series.
Output
For each input of the test case, you need to print 2 lines.
fist line should have 1 value number of terms in the series.
2nd line of the output should print the series numbers separated by single space.
Example
Input:
1
3 7 55
Output:
10
1 2 3 4 5 6 7 8 9 10
NOTE  In all the test cases all the series elements are positive integers.
The series will have at least 7 elements.
number of test cases <=100.
All the numbers will fit in 64 bits(long long in C)
hide comments
Ankit Paharia:
20120406 09:54:51
anyone plzz tell the output for


Pawe³ Mroziñski:
20120406 09:54:51
AC! 

Pawe³ Mroziñski:
20120406 09:54:51
I have good results for the test:


reyansh:
20120406 09:54:51
plz check my solution id 6690204....getting wrong answer... 

Better late than never !!!:
20120406 09:54:51
Finally Solved.... A question of patience and taking correct datatype for correct variables.... :P Last edit: 20120329 13:49:01 

Pawe³ Mroziñski:
20120406 09:54:51
TLE or WA :( Last edit: 20120319 19:42:56 

well i am lagging:
20120406 09:54:51
@devil can you please see my solution id 6666318, dont know why getting WA 

Ankit Paharia:
20120406 09:54:51
@devil d : in the test cases all the series elements should be +ve.... it's mentioned in NOTE...


Devil D:
20120406 09:54:51
@ Ankit and Sumit  You gyus are printing negative values. 

sumit jha:
20120406 09:54:51
plz check mine too 6656596 
Added by:  Devil D 
Date:  20120313 
Time limit:  0.100s 
Source limit:  10000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Own 