AP2

1
4 16 72
1
4 12 72
1
6 9 80
2
4 16 70
6 9 80
3
4 16 70
6 9 80
4 8 25
3
4 16 70
6 9 80
4 16 72
3
4 16 70
6 9 80
4 12 72
3 8 55
1
3 8 55
1
4 16 127
2
4 16 70
6 9 80
3 8 55
#include 
using namespace std;

int main()
{
	long long int tc,a,n,d;
	cin>>tc;
	while(tc--)
	{
		long long int t,lt,sum;
		cin>>t>>lt>>sum;
		
		n=2*sum/(t+lt);
		
		d=(t-lt)/(2-n+3);
		
		a=t-2*d;
		
		
		cout<
3
4 16 70
6 9 80
4 4 28
1
23377 1067 11916450
1
4 4 28
2
4 4 28
3 8 55
1
1 12 72
1
1 1 1
#include
#include
using namespace std;
int main()
{
    int t;
    scanf("%d",&t);
    while(t)
    {
        long long third,lthird,sum,n,a,d,i;
        scanf("%ld%ld%ld",&third,<hird,&sum);
        n=(2*sum)/(third+lthird);
        d=(third-lthird)/(2-n+3);
        a=third-2*d;
        printf("%ld\n",n);
        for(i=0;i
29
4 16 72
4 12 72
6 9 80
4 16 70
6 9 80
4 16 70
6 9 80
4 8 25
4 16 70
6 9 80
4 16 72
4 16 70
6 9 80
4 12 72
3 8 55
3 8 55
4 16 127
4 16 70
6 9 80
3 8 55
4 16 70
6 9 80
4 4 28
23377 1067 11916450
4 4 28
4 4 28
3 8 55
1 12 72
1 1 1
2
1 2 214
3 23 34
29
4 16 72
4 12 72
6 9 80
4 16 70
6 9 80
4 16 70
6 9 80
4 8 25
4 16 70
6 9 80
4 16 72
4 16 70
6 9 80
4 12 72
3 8 55
3 8 55
4 16 127
4 16 70
6 9 80
3 8 55
4 16 70
6 9 80
4 4 28
23377 1067 11916450
4 4 28
4 4 28
3 8 55
1 12 72
1 1 1
#22.	
29
4 16 72
4 12 72
6 9 80
4 16 70
6 9 80
4 16 70
6 9 80
4 8 25
4 16 70
6 9 80
4 16 72
4 16 70
6 9 80
4 12 72
3 8 55
3 8 55
4 16 127
4 16 70
6 9 80
3 8 55
4 16 70
6 9 80
4 4 28
23377 1067 11916450
4 4 28
4 4 28
3 8 55
1 12 72
1 1 1

3
4 16 70
6 9 80
4 12 72
1
6 9 80
2
3 8 55
6 16 110
5 5 25 
1
4 8 54
1
4 5 80
3
4 16 70
6 9 80
4 8 24
/*
 ============================================================================
 Name        : spoj_c2.c
 Author      : ankitn
 Version     :
 Copyright   : Your copyright notice
 Description : Hello World in C, Ansi-style
 ============================================================================
 */

#include 

unsigned long long int get_n(unsigned long long int x, unsigned long long int y, unsigned long long int sum) {
	return (2 * sum) / (x + y);
}

unsigned long long int get_d(unsigned long long int x, unsigned long long int y, unsigned long long int n) {
	if (n == 5) {
		return 1;
	}
	return (y - x) / (n - 5);
}

int main(int argc, const char * argv[]) {
	unsigned long long int t, x, y, i, j, k, sum;
	scanf("%llu", &t);
	for (i = 0; i < t; i++) {
		scanf("%llu%llu%llu", &x, &y, &sum);
		int n = get_n(x, y, sum);
		int d = get_d(x, y, n);
		printf("%llu\n", n);
		for (j = x - 2 * d, k = 0; k < n; j += d, k++) {
			printf("%llu", j);
			if (k + 1 < n)
				printf(" ");
		}
		//if (i + 1 < t)
			printf("\n");
	}
	return 0;
}
1 2 3 5 6
2
3 8 55
3 4 21
2
4 4 4
8
4 16 72
4 12 72
6 9 80
4 16 70
6 9 80
4 16 70
6 9 80
4 8 25
3
4 16 70
6 9 80
4 8 25
8
4 16 72
4 12 72
6 9 80
4 16 70
6 9 80
4 16 70
6 9 80
4 8 25
5

6 9 80
4 16 70
4 8 25
4 16 127
3 8 55
1 12 72
1
2 3 6
1
55 66 55
2
6 16 110
3 8 55
2
3 8 55
1
6 16 110
3 8 55
1
2 16 154
3
4 16 70
6 9 80
4 8 24
2
3 8 55
6 16 110
6 1996 1001000
1
6 1996 1001000
1
 8  262144 2097150
1
15 24990  62512500