Collatz conjectur
The Collatz conjecture is an unsolved conjecture in mathematics named after Lothar Collatz, who first proposed it in 1937. The conjecture is also known as the 3n + 1 conjecture, the Ulam conjecture (after Stanisław Ulam), Kakutani’s problem (after Shizuo Kakutani), Thwaites conjecture (after Sir Bryan Thwaites), Hasse’s algorithm (after Helmut Hasse) or the Syracuse problem;[1] the sequence of numbers involved is referred to as the hailstone sequence or hailstone numbers,[2] or as wondrous numbers.[3] – from http://en.wikipedia.org/wiki/Collatz_conjecture
The problem is here: http://online-judge.uva.es/p/v1/100.html
My solution not using STL is as below:

