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.
He's right, read the other note:
Very naive of you not to read instructions.
"There are no fractions of people. At the end of each year, the population count is an integer: 252.8 people round down to 252 persons."
"Given a number n, return the
number of positive odd numbers
below n, EASY!"Here I thought I was being clever... and completely overlooked the simpler solution.
Why do you use long type for the digit?
What would happen if "int n == -15", for example?.. Where is the checking for positive/negative int?
me too!!
This comment is hidden because it contains spoiler information about the solution
why /100 in every iteration of the loop. You can save calculations by /100 outside of loop very naive
oh, I apologize, I'm wrong. I forgot that the number n is not taken into account.
You only need to return the n positive odd numbers that comes before the given n.
for n=1 or n=3? or n=-10? something wrong.