HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Data Structures > problem:


50708 - Binary Strings

Guest
• Discussion of problem (1)

Volume problems

• 50676 - Cinema Millennium
• 50678 - The Jumping Rabbit
• 50306 - Beautiful Numbers
• 50700 - Candidates for the Mayor
• 50692 - How much money?
• 50790 - Fire Alarm
• 50710 - Permutations
• 50709 - k-ary Strings
• 50708 - Binary Strings
• 50694 - The Cheapest Flight
• 50996 - Checkers - the shortest path
• 50770 - Average Depth
• 50291 - Postfix Arithmetic Expressions
• 50775 - Balanced Parenthesis
• 50736 - Top N Donors - 2
• 50796 - KNN
• 50340 - Game 19

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan.

Binary Strings

Question: A binary code represents data or any instructions using only the two binary digits, 0 and 1. Make a program to generate all the binary strings with the length given (n).

Input specification
You will be given one integer (n) the length of of binary strings where 1 ≤ n ≤ 12.

Output specification
Show all binary strings with the length n. Every string starts from 0 and then goes to 1. Each string is shown in a separate line. No space is used within the characters of a string.

Sample Input I   
 3
Sample Input II   
 4
Sample Output I   
000
001
010
011
100
101
110
111
Sample Output II   
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111


Для отправки решений необходимо выполнить вход.

www.contester.ru