Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int i[14] = {1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192};
- int n, k = 0;
- cin >> n;
- for (int t = 0; t <= 13; t++)
- {
- if (n == i[t])
- k++;
- }
- if ( k == 1)
- cout << "YES";
- else
- cout << "NO";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement