Created
May 15, 2013 09:38
-
-
Save frank4565/5582790 to your computer and use it in GitHub Desktop.
输入一个数x,不采用加号或减号,返回x+1的值(微软实习生面试)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(x & 1) ? (x << 1 | 1) & ~x : (x | 1); | |
// by 烧掉回忆 http://www.dewen.org/q/12697#ans23348 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment