Long shaping input
# include & ltstdio.h & gt

# include & ltstring.h & gt

# DefinitionNo. 1005

int main()

{

char str 1[N],str 2[N];

int num 1[N],num2[N],t,len 1,len2,I,j,max

scanf("%d ",& ampt); //Test T data, and don't write subtraction.

getchar();

while(t -)

{

memset(str 1,0,sizeof(str 1));

memset(str 1,0,sizeof(str 2));

memset(num 1,0,sizeof(num 1));

memset(num2,0,sizeof(num 2));

scanf("%s ",str 1); //Enter the first number. This 1000 bit integer can be added together. You can change its length yourself.

scanf("%s ",str 2); //Enter the second number, because there is no long data type, and use a string to represent a large integer.

len 1 = strlen(str 1);

len 2 = strlen(str 2);

max = len 1 & gt; len2? len 1:len 2;

j = 0;

for(I = len 1- 1; I & gt=0; I-)// Note here that the conversion is reversed, but num 1 stores each bit in the forward direction.

{

num 1[j]= str 1[I]--0; //Converted into numbers and stored in the array one by one.

j++;

}

j = 0;

for(I = len 2- 1; I & gt=0; I-)

{

num 2[j]= str 2[I]--0;

j++;

}

for(I = 0; I & ltmaxI++) // Add it bit by bit.

{

num 2[I]+= num 1[I]; //Add to num2 array

if(num 2[I]& gt; = 10) // Decimal greater than 10.

{

num 2[I]-= 10;

num 2[I+ 1]+= 1;

}

}

if(num2[max]== 1)

printf("%d ",num 2[max]);

for(I = max- 1; I & gt=0; I-)// In this way, every bit of a big integer is calculated, so just output it in order.

printf("%d ",num 2[I]);

printf(" \ n ");

}

Returns 0;

}