#include#include using namespace std; int main() { int n; while(scanf("%d", &n)!= EOF) { if (!(n&(n-1))) { printf("YES\n"); } else printf("NO\n"); } } 证明:http://www.cnblogs.com/Saatgut/archive/2008/10/09/1307405.html
本文共 371 字,大约阅读时间需要 1 分钟。
#include#include using namespace std; int main() { int n; while(scanf("%d", &n)!= EOF) { if (!(n&(n-1))) { printf("YES\n"); } else printf("NO\n"); } } 证明:http://www.cnblogs.com/Saatgut/archive/2008/10/09/1307405.html
转载于:https://www.cnblogs.com/tangcong/archive/2011/08/04/2126822.html