Liệt kê nhị phân

View as PDF

Submit solution

Points: 100.00 (partial)
Time limit: 1.0s
Memory limit: 640M
Input: stdin
Output: stdout

Author:
Problem type
Allowed languages
C, C++, GAS64, Pascal, Perl, PHP, Python, Sed, TCL, Text

Hãy liệt kê dãy nhị phân có độ dài n (n ≤ 10) theo thứ tự từ điển

Dữ liệu vào: Số nguyên dương n.

Kết quả: Mỗi dòng là một dãy nhị phân theo yêu cầu bài toán.

Ví dụ:

Input

Copy
3

Output

Copy
000
001
010
011
100
101
110
111

Comments

Please read the guidelines before commenting.