- You must have known the sequence define as follows:
for every i=1,2,3,...
You can easily prove that every postive number will appear in this sequence.
Now give you a postive number n,your task is to determine the first position n appears.
- Only one number n (0<n<400000).
- The first position n appears.The answer won't exceed 263-1
- sample input
- sample output
- 64位整型数，用long long定义，输出用%lld。