Kid want to learn math better.Now Kid know how to calculate the sum of 1 to n in a short time.But this time,he is given a much more difficult question——to calculate the sum of 1 to 10^n.Kid think for a long time——10^10 ms and then he solve the question successfully.
Do you know how to solve it ?
The first line is a integer t(1<=t<=10),indicate the number of case.
For each t,there is a integer n(the meaning of n is in the above),0<=n<=10^4.
For each case,just print the answer of the sum.
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int t,n,i;
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
if(n==0)
{
printf("1\n");
continue;
}
printf("5");
for(i=0; i<n-1; i++)
{
printf("0");
}
printf("5");
for(i=0; i<n-1; i++)
{
printf("0");
}
printf("\n");
}
return 0;
}