Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You need to cover the range INT_MAX to -INT_MAX - 1 for completeness. I suggest a loop :)
nothing clever about flipping ! back and forth a bunch of times, it just reduces to ! for odd number of ! or nothing for even...
beautiful
Maybe some languages are less suited to this problem, but for C, it is definitely a beginner exercise.
This comment is hidden because it contains spoiler information about the solution
The problem asks to return the whole number of years it takes. If it does not converge, how can you return an integer?
If the description specified "Return -1 if population does not reach p in 32767 years" or something, then you could write such a test, but it doesn't.
Your basics of memorizing the ASCII character table?