编程介的小学生 2017-02-19 11:59 采纳率: 20.5%
浏览 1174
已采纳

NPY and FFT

Problem Description
A boy named NPY is learning FFT algorithm now.In that algorithm,he needs to do an operation called "reverse".
For
example,if the given number is 10.Its binary representaion is
1010.After reversing,the binary number will be 0101.And then we should
ignore the leading zero.Then the number we get will be 5,whose binary
representaion is 101.
NPY is very interested in this operation.For
every given number,he want to know what number he will get after
reversing.Can you help him?

Input
The first line contains a integer T — the number of queries (1≤T≤100).
The next T lines,each contains a integer X(0≤X≤231−1),the given number.

Output
For each query,print the reversed number in a separate line.

Sample Input
3
6
8
1

Sample Output
3
1
1

  • 写回答

2条回答 默认 最新

  • threenewbee 2017-02-23 15:36
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序