2320: X-number

内存限制:128 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:136 解决:48

题目描述

There is a special kind of number called X-number.The X-number is a very fantastic number,so Liu Sir asked you acmers to find out the X-numbers.

The X-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 should be the minimum.
Given x, you're required to calculate the X-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.

输出

Output the X-number of x for each query.

样例输入 复制

1
202

样例输出 复制

208