我只能使用这些符号:
!〜&^ | + << >>
这是我需要实现的表:
input | output
--------------
0 | 0
1 | 8
2 | 16
3 | 24
Run Code Online (Sandbox Code Playgroud)
随着输出我将左移32位int.
防爆.
int main()
{
int myInt = 0xFFFFFFFF;
myInt = (x << (myFunction(2)));
//OUTPUT = 0xFFFF0000
}
int myFunction(int input)
{
// Do some magic conversions here
}
Run Code Online (Sandbox Code Playgroud)
有任何想法吗????