2015
09-17

# I-number

The I-number of x is defined to be an integer y, which satisfied the the conditions below:
1. y>x;
2. the sum of each digit of y(under base 10) is the multiple of 10;
3. among all integers that satisfy the two conditions above, y shouble be the minimum.
Given x, you’re required to calculate the I-number of x.

An integer T(T≤100) will exist in the first line of input, indicating the number of test cases.
The following T lines describe all the queries, each with a positive integer x. The length of x will not exceed 105.

An integer T(T≤100) will exist in the first line of input, indicating the number of test cases.
The following T lines describe all the queries, each with a positive integer x. The length of x will not exceed 105.

1
202

208

/*

2013multi第一场i题、签到题。
建议直接完全暴力吧、而且时间给的那么多呢（这建议是对于比赛来说的

第一次参加多校、多少说点儿什么吧^_^，比赛真的是激情四射呀，和队

。还有比较蛋疼的是这个网速的问题、换了两次电脑才成功打开problem，赶

第一次参加multi多多少少有点儿小冲动，啰嗦的多了点儿，总之比赛还

2013-07-23
*/

#include"iostream"
#include"cstdio"
#include"cstring"
using namespace std;
const int N=110000;

int base,len,y[N],dir[N];
char x[N];
{
int i;
base=0;
for(i=0;i<len;i++)
{
y[i]+=dir[i];
y[i+1]+=y[i]/10;
y[i]%=10;
base+=y[i];
}
while(y[len])
{
base+=y[len];
len++;
}
}
int main()
{
int T;
int i;
cin>>T;
memset(dir,0,sizeof(dir));
dir[0]=1;
while(T--)
{
scanf("%s",x);
strrev(x);
memset(y,0,sizeof(y));
for(i=0;x[i];i++)	y[i]=x[i]-'0';
len=i;
}