Pro.ID22200 TitleSequence Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22200 AC0 Submit0 Ratio- 时间&空间限制描述Decompose a positive integer into sum of a sequence of consecutive positive integers. The sequence must contain at least two elements. You need to tell me the minimal length of the sequence. However, not each integer can be decomposed. Output -1 in this situation. 输入A line contains a positive integer n. ( n < 263 ) Multiple inputs. Process to the end of file. 输出Description Decompose a positive integer into sum of a sequence of consecutive positive integers. The sequence must contain at least two elements. You need to tell me the minimal length of the sequence. However, not each integer can be decomposed. Output -1 in this situation. Input A line contains a positive integer n. ( n < 263 ) Multiple inputs. Process to the end of file. Output For each case, output a line contains the minimal length. Sample Input 9 Sample Output 2 Source 样例输入9 样例输出2 作者 |