Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- int function(int n)
- {
- if (n == 1)
- {
- return 1;
- }
- if (n % 2 == 0)
- return function(n / 2);
- if (n % 2 != 0)
- return 3;
- }
- int main()
- {
- int n;
- cin >> n;
- if (function(n) == 1)
- cout << "YES" << endl;
- else
- cout << "NO" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement