Advertisement
Emiliatan

e284

Jul 5th, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. /* e284           */
  2. /* AC(0.1s, 84KB) */
  3. #include <cstdio>
  4. #include <algorithm>
  5.  
  6. using namespace std;
  7.  
  8. typedef short int16;
  9. typedef unsigned short uint16;
  10. typedef long long int64;
  11. typedef unsigned long long uint64;
  12. typedef unsigned int uint;
  13. typedef pair<int, int> pii;
  14.  
  15. int n;
  16. char ch;
  17.  
  18. int main()
  19. {
  20.     while(true)
  21.     {
  22.         n = 0;
  23.         while((ch = getchar_unlocked()) && ch != '\n' && ch != EOF)
  24.         {
  25.             n = n * 10 + ch - '0';
  26.         }
  27.         if(ch == EOF)
  28.              break;
  29.         if(n & (n - 1) || !n)
  30.         {
  31.             putchar_unlocked('N');
  32.             putchar_unlocked('o');
  33.         }
  34.         else
  35.         {
  36.             putchar_unlocked('Y');
  37.             putchar_unlocked('e');
  38.             putchar_unlocked('s');
  39.         }
  40.         putchar_unlocked('\n');
  41.     }
  42.  
  43.     return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement