P9193 [USACO23OPEN] Good Bitstrings P

Description

For any two positive integers $a$ and $b$, define the function `gen_string(a,b)` by the following Python code: ``` def gen_string(a: int, b: int): res = "" ia, ib = 0, 0 while ia + ib < a + b: if ia * b

Input Format

The first line contains $T$ $(1\le T\le10)$, the number of independent test cases. Each of the next $T$ lines contains two integers $A$ and $B$.

Output Format

The answer for each test case on a new line.

Explanation/Hint

Input $2$: $A,B\le100$;\ Input $3$: $A,B\le1000$;\ Inputs $4-7$: $A,B\le10^6$;\ Inputs $8-13$: All answers are at most $10^5$.\ Inputs $14-21$: No additional constraints.