*sdnu1483.Problem_A
来源:互联网 发布:android源码下载 编辑:程序博客网 时间:2024/06/07 03:50
1483.Problem_A
Time Limit: 1000 MS Memory Limit: 32768 KB
Total Submission(s): 117 Accepted Submission(s): 29
Description
Check whether an integer n is a power of 2.
Input
First line contains a single integer T (T<=20000000) which denotes the number of test cases. For each test case, there is an big integer N (0
#include<cstdio>#include <cmath>int main(){ double b; int i,a; scanf("%d",&a); for(i=0; i<a; i++) { scanf("%lf",&b); while(fmod(b,2)==0) { if(fmod(b,2)==0) b=b/2; else break; } if(b==1) printf("Yes\n"); else printf("No\n"); } return 0;}
本来是对的。。。又要求用Java。。。 再说吧再说吧。。。
阅读全文
0 0
- *sdnu1483.Problem_A
- PROBLEM_A: URAL 2024 Adventure Time
- SDNU 1492.Problem_A LCA倍增算法
- 【打渔】CodeForce Round 197 Div.2 Problem_A
- System v 和 Posix作用和区别(进程间通信IPC)
- 对dataframe中数据处理的办法:
- Expectation Maximization(EM)算法
- vue tab切换
- 静态导入Static import
- *sdnu1483.Problem_A
- 20. Valid Parentheses
- 创建抽象类 Transport
- Ubuntu 16.04编译安装最新的OpenCV3.2
- Android 网络连接的判断
- Servlet详解
- get和post的区别
- Python生成器(Generator)详解
- 凑数字游戏