#t281. 面值组合

面值组合

Denomination Combinations

Problem Background

Special for beginners, ^_^

Problem Description

Use 11-jiao, 22-jiao, and 55-jiao coupons to make up nn jiao. Let a,b,ca, b, c be the numbers of 11-jiao, 22-jiao, and 55-jiao coupons used, respectively. List all possible combinations of a,b,ca, b, c.

The output order is: first by cc in increasing order; if cc is the same, then by bb in increasing order.

Input Format

One integer nn (1≤n≤1001 \le n \le 100), the amount in jiao to be made up.

Output Format

Output several lines, each line in the form:

i a b c

The first column ii is the current line number (starting from 001, a fixed width of 33 characters, zero-padded on the left if shorter). The following three columns a,b,ca, b, c are the numbers of 11-jiao, 22-jiao, and 55-jiao coupons (each fixed at 1212 characters wide, padded with spaces on the left).

Sample Input

10

Sample Output

001         10           0           0
002           8           1           0
003           6           2           0
004           4           3           0
005           2           4           0
006           0           5           0
007           5           0           1
008           3           1           1
009           1           2           1
010           0           0           2

Constraints

Time limit: 1s, memory limit: 1024KiB for each test case.

Hint

Each of a,b,ca, b, c is right-aligned in a field of width 1212; the line number ii is zero-padded to width 33.