Submit solution

Points:
5

Time limit:
2.0s

Memory limit:
16M

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Write a program that repeatedly reads two numbers and and prints all bit patterns of length with ones in descending order (when the bit patterns are considered as binary numbers). You may assume that , , and . The first number in the input gives the number of pairs and . The numbers and are separated by a single space. Leading zeroes in a bit pattern should be included. See the example below.

#### Sample Input

```
3
2 1
2 0
4 2
```

#### Sample Output

```
The bit patterns are
10
01
The bit patterns are
00
The bit patterns are
1100
1010
1001
0110
0101
0011
```

## Comments