Proofs of Universal Statements: Mathematical Induction · Base of Induction

Lesson 3

Nikolai Chukhin · Alexander S. Kulikov

Programming problem. It can be shown that any integer amount \(m \ge 8\) can be exchanged using coins of denomination \(3\) and \(5\). Implement a program that reads an integer \(8 \le m < 1000\) and outputs a sequence of threes and fives whose sum is equal to \(m\).

5 points
Public samples
Public sample 1
Input
8
Expected output
3 5
Public sample 2
Input
21
Expected output
3 3 5 5 5