Generation of Combinatorial Objects · Generating Permutations
Lesson 5
Programming problem.
Write a program that reads an integer \(1 \le n \le 7\) and prints all sequences \(s=s_{0}s_{1}\dotsb s_{n-1}\) such that \(0 \le s_{i} \le i\) for all \(0 \le i \le n-1\).
Public samples
Input
1
Expected output
0