Enumerate bicolor numbers

Exactly as in the exercise "Bicolor Numbers", we define a bicolor number as a natural number nn with only two different digits that are repeated in two blocks (or "colors").

Write a program that prints all bicolor numbers with NN digits.

Input

The input consists of a natural number NN, with N2N \geq 2.

Output

A list of bicolor numbers with NN digits, one per line. The numbers can be written in any order. You can generate the output as you wish, either using integers or generating the numbers character by character.

Problem information

Author: PRO1

Generation: 2026-01-25T23:08:02.175Z

© Jutge.org, 2006–2026.
https://jutge.org