Math
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 128 M,其他语言256 M
64bit IO Format: %lld

题目描述

MINIEYE's engineer M worked out an algorithm of vehicle classification.

Algorithm input are two integers N and M, X is a real number parameter. Define the value of the input C is:

Ki(1 ≤ i ≤ M) sweeps through all non-negative integers.

If C is a negative number, the input sample is a negative sample that doesn't have valid information. If C is a positive number, then put C into decimal system; and the top non-zero digit marks 9 vehicle classification results. For example, if the top digit is 1, it means the vehicle is a truck; if the top digit is 2, the vehicle is a minibus.

Please help to work out the algorithm mentioned above.

输入描述:

The first row of the input data is an integer T(1 ≤ T ≤ 10).

For thefollowing T rows, each row has two integers M,N(1 ≤ M ≤ 30, 0 ≤ N ≤ 109) and a 2-digit decimal X, to represent a group of test.

输出描述:

The output includes T rows, the ith row represents the test result of the ith group.
If the input sample is a negative sample, then only a minus ‘-‘ will be output; otherwise a plus sign ‘+’ will be output first, then a top non-zero decimal digit of C will be output. It’s guaranteed that C ≠ 0.
示例1

输入

复制
2
3 5 0.01
3 6 0.02

输出

复制
+2
+4