import java.util.*;
import java.io.*;
class Solution{
public static void main(String []argh){
Scanner in = new Scanner(System.in);
int t=in.nextInt();
for(int i=0;i<t;i++){
int a = in.nextInt();
int b = in.nextInt();
int n = in.nextInt();
int d[]=new int[n];
int res=0;
int c=1;
for(int j=1;j<=n;j++)
{
if(j==1){
res= a +b*c;
}
else
{
res= res+b*c;
}
c=c*2;
d[j-1]=res;
}
for(int z=0;z<d.length;z++)//length is the property of array
{System.out.print(d[z]+" "); }
System.out.println("");
}
}
}
No comments:
Post a Comment