Code Golf Challenge 09-15-2015, 03:57 PM
#1
WINNER: @Neko with 30 characters
What is code golfing?
It's just like golfing. You have to complete the challenge using the least amount of characters and lines as possible!
What is the challenge?
Collatz Conjecture
Pick a positive integer n. If it is odd, multiply it by three and and then add one. Otherwise, divide it by two. The positive integer obtained is the new n, and this procedure is repeated. It is believed that n will eventually become 1.
You are to...
Write a program that takes in the value n and outputs the amount of times it must do this procedure to become 1.
FAQ
What language do we have to use?
Any. However, remember that Python would most likely beat a language like Java due to Java's required main function.
When will the competition end?
It will end a week from this date. September 22nd.
What will I get if I win?
If you are not a member of IO, you will get invited. However, if you are already a member, I will discuss your prize in a PM.
Good luck to all the competitors!
What is code golfing?
It's just like golfing. You have to complete the challenge using the least amount of characters and lines as possible!
What is the challenge?
Collatz Conjecture
Pick a positive integer n. If it is odd, multiply it by three and and then add one. Otherwise, divide it by two. The positive integer obtained is the new n, and this procedure is repeated. It is believed that n will eventually become 1.
You are to...
Write a program that takes in the value n and outputs the amount of times it must do this procedure to become 1.
FAQ
What language do we have to use?
Any. However, remember that Python would most likely beat a language like Java due to Java's required main function.
When will the competition end?
It will end a week from this date. September 22nd.
What will I get if I win?
If you are not a member of IO, you will get invited. However, if you are already a member, I will discuss your prize in a PM.
Good luck to all the competitors!


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)







