AP3 - AP - Complete The Series v2
After solving "AP - Complete The Series (easy)" very fast, Lucifer decided to make it little more interesting.
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.
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.
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.
3 7 55
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)
Last edit: 2012-08-12 18:17:10
can you please tell me a single case where my soln fails..??? id=7191204Last edit: 2012-06-21 20:04:11
Last edit: 2012-06-21 20:03:55
Last edit: 2014-02-08 03:27:25
MR. BEAN :
forum helped me....
plz chk my soln id 7066595...dont know why i m getting WA
@DevilD plz check my solutions 7066002,7066001 i had tried evrythng but nothng is working..
Can you please check my solution (id = 6981899) and tell whats wrong with it.