407821: GYM102897 H Hsueh- Draw Progress

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

H. Hsueh- Draw Progresstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

According to scientific research, in the waiting process, if the progress bar can be used to show the progress, the waiting person will be more patient.

Therefore, Hsueh- needs you to help him draw a progress bar in command line.

The specific progress bar style can be obtained by observing the sample.

Input

There are several test cases.

The first line contains a single integer $$$T(1 \leq T \leq 10)$$$, denoting the number of test cases. Then follow all the test cases.

For each test case, the first line contains two integers $$$n(1 \leq n \leq 10^5)$$$ and $$$m(0 \leq m \leq n)$$$, denoting the total number of processes and number of completed processes.

Output

For each test case, you first need to draw a progress bar and then you need to output the percentage of progress. In other words, the percentage of progress is $$$\lfloor \frac{m}{n} \rfloor$$$.

It is worth noting that, in the progress bar, we use "#" to indicate completed processes, and "-" to indicate unfinished processes.

ExampleInput
6
10 2
15 5
9 3
4 2
5 0
10 10
Output
[##--------] 20%
[#####----------] 33%
[###------] 33%
[##--] 50%
[-----] 0%
[##########] 100%

加入题单

上一题 下一题 算法标签: