tuttelikz

#692 - Бинарные числа [+]

Sep 26th, 2015
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <vector>
  4. #include <algorithm>
  5. #include <cstdio>
  6. #include <math.h>
  7. #include <string>
  8. #include <stdio.h>
  9. #include <string.h>
  10. #include <string>
  11. #include <stdlib.h>
  12. #include <cmath>
  13. #include <iomanip>
  14. #include <fstream>
  15. #include <queue>
  16.  
  17. using namespace std;
  18.  
  19. int main(int argc, const char * argv[]) {
  20.     int a,c;
  21.     double b;
  22.     cin>>a;
  23.     b=log2(a);
  24.     c=log2(a);
  25.     if(b==c)cout<<"YES"<<endl;
  26.     else cout<<"NO"<<endl;
  27.    
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment