Problem1486--组合

1486: 组合

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

找出n个自然数(1,2,3,4…,n)中取3个数的组合,(n由用户输入)并输出所有的组合。

Input

输入一个自然数n,   n的含义如题目描述

Output

输出共有多少种组合  

按字典序输出每种排列 

Sample Input Copy

5

Sample Output Copy

10
1 2 3
1 2 4
1 2 5
1 3 4
1 3 5
1 4 5
2 3 4
2 3 5
2 4 5
3 4 5

Source/Category

admin