1 solutions

  • 1
    @ 2025-11-21 18:21:25

    #include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; if (N <= 0) { cout << "no" << endl; return 0; } while (N % 2 == 0) { N /= 2; } if (N == 1) { cout << "yes" << endl; } else { cout << "no" << endl; } return 0; } //循环除以2

    • 1

    Information

    ID
    847
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    9
    Tags
    (None)
    # Submissions
    10
    Accepted
    7
    Uploaded By