单点时限: 2.0 sec
内存限制: 256 MB
给定一个整数 $n$($0 \leqslant n \leqslant 10^{100}$)、将 $n$ 的 $334$ 位二进制表示形式(不包括开头可能的值为 $0$ 的位,$n=0$ 表示为 $1$ 位 $0$)前后倒置,输出倒置后的二进制数对应的整数。
例如:$n=10$,其二进制表示为 $(330 个 0)1010$,倒置后为 $0101$,对应输出就是 $5$。
第 $1$ 行:一个整数 $T$ ($1 \le T \le 10$) 为问题数。
接下来共 $T$ 行整数,对应每个问题有 $1$ 行,表示 $n$。
对于每个问题,输出一行问题的编号($0$ 开始编号,格式:case #0:
等)。
然后对应每个问题在一行中输出结果。
3 10 0 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
case #0: 5 case #1: 0 case #2: 7715442851596369463000695959966459436485038766875199595258933941809737
十进制10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000的334位二进制表示为:
0100100100100110101101001001011001010011000011011111001110101100001011001001111000010011000100110011100000101111110011100010101100111001000000100011100010000100011010011111001010101010110010010000110000100010101000001011101000111100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,
不包括开头的 1个0为:
100100100100110101101001001011001010011000011011111001110101100001011001001111000010011000100110011100000101111110011100010101100111001000000100011100010000100011010011111001010101010110010010000110000100010101000001011101000111100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,
倒置后为:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001111000101110100000101010001000011000010010011010101010100111110010110001000010001110001000000100111001101010001110011111101000001110011001000110010000111100100110100001101011100111110110000110010100110100100101101011001001001001,
对应十进制值为:
7715442851596369463000695959966459436485038766875199595258933941809737