W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem [email protected].
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, zapraszamy na serwery Discord. Są one moderowane przez społeczność, ale członkowie zespołu technicznego też są tam aktywni.
Certain positive integers have their decimal representation consisting only of ones and zeros, and having at least one digit one, e.g. 101. If a positive integer has not such a property, one can try to multiply it by some positive integer to find out whether the product has this property.
Write a program which:
The standard input contains in the first line a positive integer . In consecutive lines there is a sequence of numbers in the range of [], one number per line. The numbers in the standard input are written correctly, and your program need not verify that.
Each line of the standard output, starting with the first, should contain:
For the input data:
6 17 11011 17 999 125 173
the correct result is:
11101 11011 11101 111111111111111111111111111 1000 1011001101
Task author: Andrzej Walat.