文件名称:jiafaa
介绍说明--下载内容均来自于网络,请自行研究使用
题目描述:
一个正整数有可能可以被表示为n(n>=2)个连续正整数之和,如:
15=1+2+3+4+5
15=4+5+6
15=7+8
请编写程序,根据输入的任何一个正整数,找出符合这种要求的所有连续正整数序列。
输入数据:一个正整数,以命令行参数的形式提供给程序。
输出数据:在标准输出上打印出符合题目描述的全部正整数序列,每行一个序列,每个序列都从该序列的最小正整数开始、以从小到大的顺序打印。如果结果有多个序列,按各序列的最小正整数的大小从小到大打印各序列。此外,序列不允许重复,序列内的整数用一个空格分隔。如果没有符合要求的序列,输出“NONE”。-Title Descr iption:
The possibility of a positive integer can be expressed as n (n> = 2) months of consecutive positive integers and, such as:
15 = 1+2+3+4+5
15 = 4+5+6
15 = 7+8
Please preparation procedures, in accordance with the importation of any positive integer, in line with such a request to identify all the sequence of consecutive positive integers.
Input data: a positive integer to the command line parameters to the procedures provided in the form.
Output data: in the standard print output on the subject in line with the descr iption of all the positive integer sequences, one sequence per line, each sequence from the sequence of the smallest positive integer starting with the order from small to large print. If the results of a number of sequences, each sequence of the smallest positive integer size from small to large print the sequence. In addition, the sequence does not allow duplication of sequence within a space-separated integers. If you do not meet
一个正整数有可能可以被表示为n(n>=2)个连续正整数之和,如:
15=1+2+3+4+5
15=4+5+6
15=7+8
请编写程序,根据输入的任何一个正整数,找出符合这种要求的所有连续正整数序列。
输入数据:一个正整数,以命令行参数的形式提供给程序。
输出数据:在标准输出上打印出符合题目描述的全部正整数序列,每行一个序列,每个序列都从该序列的最小正整数开始、以从小到大的顺序打印。如果结果有多个序列,按各序列的最小正整数的大小从小到大打印各序列。此外,序列不允许重复,序列内的整数用一个空格分隔。如果没有符合要求的序列,输出“NONE”。-Title Descr iption:
The possibility of a positive integer can be expressed as n (n> = 2) months of consecutive positive integers and, such as:
15 = 1+2+3+4+5
15 = 4+5+6
15 = 7+8
Please preparation procedures, in accordance with the importation of any positive integer, in line with such a request to identify all the sequence of consecutive positive integers.
Input data: a positive integer to the command line parameters to the procedures provided in the form.
Output data: in the standard print output on the subject in line with the descr iption of all the positive integer sequences, one sequence per line, each sequence from the sequence of the smallest positive integer starting with the order from small to large print. If the results of a number of sequences, each sequence of the smallest positive integer size from small to large print the sequence. In addition, the sequence does not allow duplication of sequence within a space-separated integers. If you do not meet
(系统自动生成,下载前可以参看下载内容)
下载文件列表
算法.txt