Back
Close
  • 18

Statement

 Goal

In this puzzle, you have to find out if it is possible to compute the number in input by summing at least two consecutive positive odd numbers.
Input
A single number n.
Output
Line 1: the number of valid solutions.
Line 2: first and last values of the longest sequence of consecutive odd numbers.
Constraints
n < 2^32
Example
Input
15
Output
1
3 7
Solve it

A higher resolution is required to access the IDE

codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants